| Other |
|---|
| 5.0 b58Fixed |
|
Relates :
|
The following reflection test case fails (t is assigned null):
import java.lang.reflect.*;
class A<T> {
Object o = new Object() {
public T t;
};
public static void main(String[] args) throws NoSuchFieldException {
Type t = new A<Integer>().o.getClass().getField("t").getGenericType();
if (!(t instanceof TypeVariable))
throw new Error("" + t);
}
}
|