Github user solomax commented on a diff in the pull request:

    https://github.com/apache/wicket/pull/246#discussion_r151861199
  
    --- Diff: 
wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
 ---
    @@ -208,24 +206,28 @@ public void detach(Component component)
     
        boolean isRequired()
        {
    -           List<NotNull> constraints = findNotNullConstraints();
    +           BeanValidationContext config = 
BeanValidationConfiguration.get();
    +           List<Class<? extends Annotation>> notNullAnnotations = 
config.getNotNullAnnotations();
    +           Map<Annotation, ConstraintDescriptor<?>> constraints = 
findNotNullConstraints(
    +                   notNullAnnotations);
     
                if (constraints.isEmpty())
                {
                        return false;
                }
     
    -           HashSet<Class<?>> validatorGroups = new HashSet<Class<?>>();
    +           HashSet<Class<?>> validatorGroups = new HashSet<>();
                validatorGroups.addAll(Arrays.asList(getGroups()));
    --- End diff --
    
    I would use `Set` here


---

Reply via email to