|
There is an infinite loop occurring in TypeHelper.normalize(). The issue seems to occur any time a parameterized supertype is passed into TypeHelper.isAssignable.
I was able to see that in my test cases, ParameterizedType.getActualTypeArguments() is returning the same exact object as Class.getTypeParameters()... which causes TypeHelper to create a map with an entry where Key = Value. Given the logic in TypeHelper.normalize(), this in turn causes an infinite loop.
private static <K, V> Map<K, V> normalize(Map<K, V> map) {
for ( Entry<K, V> entry : map.entrySet() ) {
K key = entry.getKey();
V value = entry.getValue();
while ( map.containsKey( value ) ) {
value = map.get( value );
}
map.put( key, value );
}
return map;
}
I've attached a couple of test cases. Which illustrate the issue.
|