TypeVariablesVariableResolver compares variables by name
Issue: SPR-16456
This commit is contained in:
@@ -1337,6 +1337,14 @@ public class ResolvableTypeTests {
|
||||
assertTrue(setClass.isAssignableFrom(fromReturnType));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSpr16456() throws Exception {
|
||||
ResolvableType genericType = ResolvableType.forField(
|
||||
UnresolvedWithGenerics.class.getDeclaredField("set")).asCollection();
|
||||
ResolvableType type = ResolvableType.forClassWithGenerics(ArrayList.class, genericType.getGeneric());
|
||||
assertThat(type.resolveGeneric(), equalTo(Integer.class));
|
||||
}
|
||||
|
||||
|
||||
private ResolvableType testSerialization(ResolvableType type) throws Exception {
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
@@ -1637,4 +1645,10 @@ public class ResolvableTypeTests {
|
||||
public Collection<IBase<BT>> stuff;
|
||||
}
|
||||
|
||||
|
||||
public abstract class UnresolvedWithGenerics {
|
||||
|
||||
Set<Integer> set;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user