Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRM-09 : startOfPeriod and endOfPeriod not there exception should be handled properly #61

Closed
wants to merge 1 commit into from

Conversation

Choxmi
Copy link
Contributor

@Choxmi Choxmi commented Jul 11, 2017

Link of the JIRA ticket : https://issues.openmrs.org/browse/DRM-9

@Choxmi
Copy link
Contributor Author

Choxmi commented Jul 11, 2017

@dkayiwa I made the changes according to the document. Please review and give feedback.

dvTypeList.add( dvtype );
}
catch ( NumberFormatException e )
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not recommended to catch exceptions and do nothing. You would rather leave them to bubble through.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You seem to have nothing to do in the exception handler. Can't you just remove the try and catch to let it bubble up?

query.setParameter( "endOfPeriod", period.getEndDate() );
if ( parameters.contains( "startOfPeriod" ) )
{
query.setParameter( "startOfPeriod", period.getStartDate() );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add some unit tests for these changes?

@Choxmi
Copy link
Contributor Author

Choxmi commented Aug 12, 2017

@dkayiwa I changed the exception handling part and added a test case.

@dkayiwa
Copy link
Member

dkayiwa commented Sep 18, 2017

@Choxmi can you squash the commits into one as advised at? https://wiki.openmrs.org/display/docs/Pull+Request+Tips

Update ReportController.java

TestCase for evaluateDataValueTemplate
@Choxmi
Copy link
Contributor Author

Choxmi commented Oct 17, 2017

Will do @dkayiwa

@Choxmi
Copy link
Contributor Author

Choxmi commented Oct 17, 2017

@dkayiwa can you please review it now.

@dkayiwa
Copy link
Member

dkayiwa commented Nov 15, 2017

@Choxmi you do not seem to have addressed my review comments.

@dkayiwa
Copy link
Member

dkayiwa commented Jan 2, 2018

@Choxmi i will reopen when you resume

@dkayiwa dkayiwa closed this Jan 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants