Skip to content

Commit

Permalink
try to fix tests rev.7
Browse files Browse the repository at this point in the history
  • Loading branch information
MarieTask committed Jan 27, 2024
1 parent 9abf7e3 commit d010dae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/main/java/hexlet/code/schemas/BaseSchema.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ protected final void addCondition(Predicate<Object> condition) {
conditions.add(condition);
}
public final boolean isValid(Object obj) {
if (!isRequired) {
if (!isRequired && conditions.stream().findFirst().equals(false)) {
return true;
}
return (conditions.stream().allMatch(condition -> condition.test(obj)));
Expand Down

0 comments on commit d010dae

Please sign in to comment.