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 129104 - Java editor does not recognize name clashes with generics
Summary: Java editor does not recognize name clashes with generics
Status: RESOLVED DUPLICATE of bug 106715
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 blocker with 1 vote (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-04 10:43 UTC by mgoe
Modified: 2008-03-04 16:48 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 mgoe 2008-03-04 10:43:05 UTC
Editing the class below does not show any errors.

package javaapplication1;

import java.util.List;

public class Main {
    public void useList(List<String> strings) {
    }
    
    public void useList(List<Long> longs) {
    }

    public static void main(String[] args) {
    }
}

But compiling the class gives:
/xxx/NetBeansProjects/JavaApplication1/src/javaapplication1/Main.java:6: name clash: 
useList(java.util.List<java.lang.String>) and useList(java.util.List<java.lang.Long>) have the same erasure
    public void useList(List<String> strings) {
/xxx/NetBeansProjects/JavaApplication1/src/javaapplication1/Main.java:9: name clash: 
useList(java.util.List<java.lang.Long>) and useList(java.util.List<java.lang.String>) have the same erasure
    public void useList(List<Long> longs) {
2 errors
Comment 1 Jan Lahoda 2008-03-04 16:48:42 UTC

*** This issue has been marked as a duplicate of 106715 ***