Skip to content

Commit

Permalink
Replace boolean casting with Boolean.TRUE.equals comparison in BaseNu…
Browse files Browse the repository at this point in the history
…llableCheckValidator
  • Loading branch information
tmarmilic committed Jan 17, 2024
1 parent 5eb5698 commit 44db3cc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ protected boolean isValid(Object value, Class<? extends Predicate<?>> conditionC
private boolean invokeConditionClosure(Class<? extends Predicate<?>> conditionClass, Object value) {
Constructor<? extends Predicate<?>> closureConstructor = conditionClass.getDeclaredConstructor(Object.class, Object.class);

return (boolean) conditionClass.getMethod("call", Object.class).invoke(closureConstructor.newInstance(value, value), value);
return Boolean.TRUE.equals(conditionClass.getMethod("call", Object.class).invoke(closureConstructor.newInstance(value, value), value));
}

private Object resolvePropertyValue(Object parent, String propertyName) {
Expand Down

0 comments on commit 44db3cc

Please sign in to comment.