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 152018

Summary: [rename] No warning when renaming generics to exisint one
Product: java Reporter: Jiri Prox <jiriprox>
Component: RefactoringAssignee: Jan Becicka <jbecicka>
Status: NEW ---    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description Jiri Prox 2008-10-31 17:44:56 UTC
There is no warning when renaming generic to identifier which already exists.

Example:
1) have a class:
public class Main<X,Y> {

    X a;
    Y b;
}

put caret on X and call Rename
-> it is possible to enter Y w/o any warning.
-> the names of imported classes are not valid names, since it can break the code

Example:

rename X to List in following code:

import java.util.List;
public class Main<X> {
    List a;
    X b;
    public void test() {
        a.add("");        
    }
}