Skip to content

Commit e15f2fc

Browse files
author
Markus Gulden
committed
Updates after editor feedback
1 parent b9ac0dc commit e15f2fc

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

‎javaxval/src/main/java/org/baeldung/javaxval/methodvalidation/constraints/ValidReservationValidator.java‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,10 @@ public boolean isValid(Reservation reservation, ConstraintValidatorContext conte
2727
return false;
2828
}
2929

30-
if (reservation.getBegin()
30+
return (reservation.getBegin()
3131
.isAfter(LocalDate.now())
3232
&& reservation.getBegin()
3333
.isBefore(reservation.getEnd())
34-
&& reservation.getRoom() > 0) {
35-
36-
return true;
37-
}
38-
return false;
34+
&& reservation.getRoom() > 0);
3935
}
4036
}

0 commit comments

Comments
 (0)