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 - [rename] No warning when renaming generics to exisint one
Summary: [rename] No warning when renaming generics to exisint one
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jan Becicka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-31 17:44 UTC by Jiri Prox
Modified: 2010-09-23 08:44 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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("");        
    }
}