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 - Synchronizing on a generic interface in 1.4 source tries to use generic types
Summary: Synchronizing on a generic interface in 1.4 source tries to use generic types
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Daniel Prusa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-04 02:09 UTC by Jesse Glick
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 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