Update MaxSizeConstraintValidator.java

This commit is contained in:
Liu Chuang 2020-09-25 15:12:35 +08:00 committed by GitHub
parent d100adc9c5
commit b5d49958eb
1 changed files with 1 additions and 5 deletions

View File

@ -11,11 +11,7 @@ public class MaxSizeConstraintValidator implements ConstraintValidator<MaxSizeCo
@Override
public boolean isValid(List<Movie> values, ConstraintValidatorContext context) {
boolean isValid = true;
if (values.size() > 4) {
isValid = false;
}
return isValid;
return value.size()<=4
}
}