| Sure, here is a snippet from our actual code. The test cases I uploaded attempt to display the fact that when you have a class like this
@HasValidDeliveryPeriodDates
public abstract class GenericMaturity<P extends Product> implements Maturity<P>
The constraint itself is not important. The fact that the class is abstract is also not important. The only way to hit the infinite loop that I've found is if the following conditions are true. 1. The generic type of the class implements an interface of the same generic type. (GenericMaturity<P extends Product> implements Maturity<P>) 2. You attempt to use a class level constraint to do cross-parameter validation (@HasValidDeliveryPeriodDates) In this specific scenario TypeHelper will construct a map of type parameters to type arguments. Since the type argument for this class is P... and the type parameter for the super class is also P, the map of parameters to arguments will include an entry where P -> P. In the TypeHelper.normalize method, this causes an issue because of this:
while ( map.containsKey( value ) ) {
value = map.get( value );
}
|