Same behaviour with Hibernate 5.0.0.Alpha1:
import javax.validation.Validation; import javax.validation.Validator; import javax.validation.constraints.NotNull; import org.hibernate.validator.HibernateValidator; public class HibernateBug { public static String sayHi(@NotNull String name) { return "Hello " + name; } public static void main(String[] args) throws Exception { Validator validator = Validation.byProvider(HibernateValidator.class) .configure() .buildValidatorFactory() .getValidator(); validator.validateParameters(null, HibernateBug.class.getMethod("sayHi", String.class), new Object[] { null }); } }
There seems no reason why this couldn't work (Apache BVal does implement this).
Same behaviour with Hibernate 5.0.0.Alpha1:
There seems no reason why this couldn't work (Apache BVal does implement this).