[Minor] Automated Code cleanup: Simplifiable conditional expression

This commit is contained in:
Robert von Burg 2023-04-04 11:36:06 +02:00
parent e77f4e5da9
commit 238e8e2610
Signed by: eitch
GPG Key ID: 75DB9C85C74331F7
3 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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) {

View File

@ -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) {