title: Annotations from javax.validation.constraints in combination with custom ConstraintValidator
body: <p>I have a problem to combine the javax annotation with custom ConstraintValidators. </p>
  
  <p>I have an example class Person, where the name and the age are required.</p>
  
  <pre><code>@PersonConstraint
  public class Person {
  
       @NotNull
       private String name;
       @NotNull
       private Integer age;     
       ...
  }
  </code></pre>
  
  <p>And I have an additional constraint:</p>
  
  <pre><code>@Constraint(validatedBy = PersonValidator.class)
  @Target(TYPE)
  @Retention(RetentionPolicy.RUNTIME)
  public @interface PersonConstraint{
  
      String message() default  "...";
      Class&lt;?&gt;[] groups() default {};
      Class&lt;? extends Payload&gt;[] payload() default {};
  }
  </code></pre>
  
  <p>For the custom Validator:</p>
  
  <pre><code>public class PersonValidator implements ConstraintValidator&lt;PersonConstraint, Person&gt; {
      ...
      @Override
      public boolean isValid(Person value, ConstraintValidatorContext context) {
          if(value.getAge() &lt; 18) 
              return false;
          ...
      }
  }
  </code></pre>
  
  <p>When a Person object is validated now and the age is null, I got a Nullpointer Exception in the PersonValidator. I thoguht, this is something, which is checked by the javax Annoation @NotNull. 
  Is there a solution to combine the annotations with the custom validators or do I have to check the null values in the validor by myself?</p>
  
  <p>(The code is just an example - but this is a general question)</p>