Updates after editor feedback

This commit is contained in:
Markus Gulden 2018-02-05 11:17:37 +01:00
parent c03e0919e1
commit 7ecceaf5e2
2 changed files with 2 additions and 10 deletions

View File

@ -9,15 +9,11 @@ import java.time.LocalDate;
@SupportedValidationTarget(ValidationTarget.PARAMETERS)
public class ConsistentDateParameterValidator implements ConstraintValidator<ConsistentDateParameters, Object[]> {
@Override
public void initialize(ConsistentDateParameters constraintAnnotation) {
}
@Override
public boolean isValid(Object[] value, ConstraintValidatorContext context) {
if (value[0] == null || value[1] == null) {
return false;
return true;
}
if (!(value[0] instanceof LocalDate) || !(value[1] instanceof LocalDate)) {

View File

@ -8,15 +8,11 @@ import java.time.LocalDate;
public class ValidReservationValidator implements ConstraintValidator<ValidReservation, Reservation> {
@Override
public void initialize(ValidReservation constraintAnnotation) {
}
@Override
public boolean isValid(Reservation reservation, ConstraintValidatorContext context) {
if (reservation == null) {
return false;
return true;
}
if (!(reservation instanceof Reservation)) {