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 44327

Summary: Synchronizing on a generic interface in 1.4 source tries to use generic types
Product: java Reporter: Jesse Glick <jglick>
Component: UnsupportedAssignee: Daniel Prusa <dprusa>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 4.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description Jesse Glick 2004-06-04 02:09:03 UTC
040603. I have some code in an NBM project, which
declares that it is using 1.4 source
(SourceLevelQuery).

I write

private static final class TargetComparator
implements Comparator/*<Target>*/ {
    public TargetComparator() {}
}

and invoke Tools -> Synchronize. (For some reason,
did not pop up automatically.) It offers to add
the compare method, which I accept. But that produces

    public int compare(T o1, T o2) {
    }

which is of course a compiler error - there is no
class named T, this is supposed to be a generic
type parameter. But I can't even use generics in
this source file - it is not 1.5 source.

Should be producing

    public int compare(Object o1, Object o2) {
    }
Comment 1 Tomas Hurka 2004-06-22 08:41:49 UTC
Moved to new subcomponent java/javacore.
Comment 2 Daniel Prusa 2004-06-25 13:25:44 UTC
Fixed.
Checking in ElementImpl.java;
/cvs/java/src/org/netbeans/modules/java/bridge/ElementImpl.java,v  <--
 ElementImpl.java
new revision: 1.7; previous revision: 1.6
Comment 3 Quality Engineering 2007-09-20 09:47:56 UTC
Reorganization of java component