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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user