Simplify boolean returns

Simplify boolean returns of the form:

	if (b) {
		return true;
	} else {
		return false;
	}

to:

	return b;

Issue gh-8945
This commit is contained in:
Phillip Webb
2020-07-27 20:22:28 -07:00
committed by Rob Winch
parent b69825d925
commit 9a3fa6e812
8 changed files with 8 additions and 44 deletions

View File

@@ -37,12 +37,7 @@ public class DenyAgainVoter implements AccessDecisionVoter<Object> {
@Override
public boolean supports(ConfigAttribute attribute) {
if ("DENY_AGAIN_FOR_SURE".equals(attribute.getAttribute())) {
return true;
}
else {
return false;
}
return "DENY_AGAIN_FOR_SURE".equals(attribute.getAttribute());
}
@Override

View File

@@ -39,12 +39,7 @@ public class DenyVoter implements AccessDecisionVoter<Object> {
@Override
public boolean supports(ConfigAttribute attribute) {
if ("DENY_FOR_SURE".equals(attribute.getAttribute())) {
return true;
}
else {
return false;
}
return "DENY_FOR_SURE".equals(attribute.getAttribute());
}
@Override