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.

Bug 55511 - broken model for method with generics
Summary: broken model for method with generics
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: PC All
: P2 blocker (vote)
Assignee: Martin Matula
URL:
Keywords:
Depends on:
Blocks: 48859
  Show dependency tree
 
Reported: 2005-02-24 17:15 UTC by Jan Pokorsky
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Pokorsky 2005-02-24 17:15:15 UTC
Have a class A and its subclass B:

class A {
  <T> T getVal(T p1) {return null;}
}
class B extends A {
  <T> T getVal(T p1) {return null;}
}

If you traverse the model from the resource B
(getClasifiers->getContents) you get the method
B.getVal (it is Method$Impl). Type of the
parameter p1 is instance of TypeParameter$Impl. So
far so good.

Now if you traverse (B.getSuperClass->getContents)
to method A.getVal (it is
ParametrizedTypeImpl$MethodWrapper) the type of
parameter p1 is instance of ParametrizedType$Impl
with definition as UnresolvedClass!

This seems to break Overide action, Overridden
annotations, code completion, ...
Comment 1 Martin Matula 2005-02-24 22:09:12 UTC
Fixed.

Checking in src/org/netbeans/modules/javacore/parser/TypeParamRef.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/parser/TypeParamRef.java,v
 <--  TypeParamRef.java
new revision: 1.5; previous revision: 1.4
done
Checking in
src/org/netbeans/modules/javacore/parser/ClassInfoMeasure.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/parser/ClassInfoMeasure.java,v
 <--  ClassInfoMeasure.java
new revision: 1.6; previous revision: 1.5
done
Checking in
src/org/netbeans/modules/javacore/jmiimpl/javamodel/SemiPersistentElement.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/SemiPersistentElement.java,v
 <--  SemiPersistentElement.java
new revision: 1.66; previous revision: 1.65
done
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.20; previous revision: 1.19
done
Checking in
src/org/netbeans/modules/javacore/jmiimpl/javamodel/CallableFeatureImpl.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/CallableFeatureImpl.java,v
 <--  CallableFeatureImpl.java
new revision: 1.21; previous revision: 1.20
done
Checking in
src/org/netbeans/modules/javacore/jmiimpl/javamodel/JavaClassImpl.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/JavaClassImpl.java,v
 <--  JavaClassImpl.java
new revision: 1.49; previous revision: 1.48
done
Comment 2 Jiri Prox 2005-07-14 10:04:37 UTC
Can you, please, verify this issue? Thanks.
Comment 3 Jan Pokorsky 2005-07-14 12:28:07 UTC
verified, it works now.
Comment 4 Quality Engineering 2007-09-20 10:48:50 UTC
Reorganization of java component