[Minor] Automated Code cleanup: Simplifiable conditional expression
This commit is contained in:
parent
e77f4e5da9
commit
238e8e2610
|
@ -406,7 +406,7 @@ public class StrolchBootstrapper extends DefaultHandler {
|
|||
}
|
||||
|
||||
String defaultS = attributes.getValue(DEFAULT);
|
||||
this.defaultAllowed = defaultS == null ? false : StringHelper.parseBoolean(defaultS);
|
||||
this.defaultAllowed = defaultS != null && StringHelper.parseBoolean(defaultS);
|
||||
|
||||
break;
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ public class ExpressionTerm extends AbstractBooleanExpression {
|
|||
@Override
|
||||
public boolean evaluate(final Map<String, Object> inputObjects, final Map<String, Object> queryParameter) {
|
||||
boolean result = comparisonExpression.evaluate(inputObjects, queryParameter);
|
||||
return not ? !result : result;
|
||||
return not != result;
|
||||
}
|
||||
|
||||
public void setNot(boolean not) {
|
||||
|
|
|
@ -11,7 +11,7 @@ public class WhereExpression extends AbstractBooleanExpression {
|
|||
|
||||
@Override
|
||||
public boolean evaluate(Map<String, Object> inputObjects, Map<String, Object> queryParameter) {
|
||||
return (orExpression == null) ? true : orExpression.evaluate(inputObjects, queryParameter);
|
||||
return orExpression == null || orExpression.evaluate(inputObjects, queryParameter);
|
||||
}
|
||||
|
||||
public void setOrExpression(OrExpression orExpression) {
|
||||
|
|
Loading…
Reference in New Issue