JDK-4992170 : (reflect) enclosing type parameter missing in anonymous and local classes
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang:reflect
  • Affected Version: 5.0
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_8
  • CPU: generic
  • Submitted: 2004-02-10
  • Updated: 2012-09-28
  • Resolved: 2004-06-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 b58Fixed
Related Reports
Relates :  
Description
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);
    }
}

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger-rc FIXED IN: tiger-rc INTEGRATED IN: tiger-b58 tiger-rc
17-07-2004

PUBLIC COMMENTS This should be fixed in the next tiger release. ###@###.### 2004-06-22
22-06-2004

EVALUATION Fixing this problem requires the functionality described in 4992173. ###@###.### 2004-06-07
07-06-2004