Skip to content

Commit 899338e

Browse files
authored
RA-1816: Return of boolean expressions should not be wrapped into an 'if-then-else' statement (#84)
1 parent 7ed5ded commit 899338e

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

omod/src/main/java/org/openmrs/module/referenceapplication/page/controller/LoginPageController.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -355,10 +355,7 @@ public String post(@RequestParam(value = "username", required = false) String us
355355
* @return
356356
*/
357357
private boolean isSelectLocationRequest(boolean isUserLocPropEnabled) {
358-
if (isUserLocPropEnabled && Context.isAuthenticated() && Context.getUserContext().getLocationId() == null) {
359-
return true;
360-
}
361-
return false;
358+
return isUserLocPropEnabled && Context.isAuthenticated() && Context.getUserContext().getLocationId() == null;
362359
}
363360

364361
private boolean isSameUser(PageRequest pageRequest, String username) {

0 commit comments

Comments
 (0)