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-28: Map Location Page Crashes when DHIS2 Instance has no ORG Units #66

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gitcliff
Copy link

DRM-28: Map Location Page Crashes when DHIS2 Instance has no ORG Unit
link:https://issues.openmrs.org/browse/DRM-28
I set the DHIS2OrgUnits value to false and also checked the null value

@gitcliff
Copy link
Author

@samuelmale kindly please review

@RequestParam(value = "openmrsLocations", required = true) String openmrsLocationName,
WebRequest webRequest) {
System.out.println("org unit does not exits and it is : " + dhis2OrgUnitCode);
String referer = webRequest.getHeader("Referer");

if (dhis2OrgUnitCode.equals("")) {
if (dhis2OrgUnitCode == null || dhis2OrgUnitCode.isEmpty()) {
Copy link
Member

Choose a reason for hiding this comment

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

@gitcliff , can you take a look at the java convestions here https://wiki.openmrs.org/display/docs/Java+Conventions.

dhis2OrgUnitCode == null || dhis2OrgUnitCode.isEmpty() , this is discouraged. instead take use of the apache commons string utils library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants