This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Have an interface interface I<T extends Runnable> { void m(I p); } and a class class C implements I { } If you traverse from the class C to method I.m using JMI the type of the parameter p is resolved to java.lang.Object which is wrong. The correct one should be java.lang.Runnable according to generics specification.
I have a patch for this issue (will attach). However I am not sure if I should commit it since something seems to hold hard reference to the ParameterizedType which prevents its garbage collection. As a result if you change the bounds of the type parameter in the interface, javacore still returns the ParameterizedType with the original type parameters substitutions (old bounds). I need to investigate more why this is the case.
Created attachment 21268 [details] Proposed patch to fix the type parameters substitution.
Fixed. Checking in src/org/netbeans/modules/javacore/jmiimpl/javamodel/ParameterizedTypeImpl.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/ParameterizedTypeImpl.java,v <-- ParameterizedTypeImpl.java new revision: 1.24; previous revision: 1.23 done Checking in src/org/netbeans/modules/javacore/jmiimpl/javamodel/TypeParameterImpl.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/TypeParameterImpl.java,v <-- TypeParameterImpl.java new revision: 1.25; previous revision: 1.24 done
Reorganization of java component