HV-877 Supporting type use constraints on type arguments

This applies to `PropertyMetaData`. After your feedback, I'll continue the work on parameters and return values and I'll extend `ParameterMetaData` and `ReturnValueMetaData`.
Hum, it's also passing with build 1.8.0_20-ea-b17. Which exact version do
you use?


2014-08-01 9:11 GMT+02:00 Khalid <notifications@github.com>:

> In
> engine/src/main/java/org/hibernate/validator/internal/metadata/provider/TypeUseAnnotationMetaDataProvider.java:
>
> > +
> > +		if ( member instanceof Method ) {
> > +			annotatedType = ( (Method) member ).getAnnotatedReturnType();
> > +		}
> > +
> > +		return findTypeArgumentsConstraints( member, annotatedType );
> > +	}
> > +
> > +	@Override
> > +	protected Set<MetaConstraint<?>> findTypeArgumentsConstraints(Member member, int i) {
> > +		Parameter parameter = ( (Executable) member ).getParameters()[i];
> > +		try {
> > +			return findTypeArgumentsConstraints( member, parameter.getAnnotatedType() );
> > +		}
> > +		catch ( ArrayIndexOutOfBoundsException ex ) {
> > +			// Synthetic parameter, ignore
>
> You need to run the test in JDK 1.8u20. You'll get a
> java.lang.ArrayIndexOutOfBoundsException.
>
> Maybe it's a JDK problem since the test runs successfully in JDK 8u5 and
> 8u11.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/hibernate/hibernate-validator/pull/332/files#r15684463>
> .
>