Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 152018 - [rename] No warning when renaming generics to exisint one
[rename] No warning when renaming generics to exisint one
Status: NEW
Product: java
Classification: Unclassified
Component: Refactoring
6.x
All All
: P3 (vote)
: TBD
Assigned To: Jan Becicka
issues@java
:
Depends on:
Blocks:
  Show dependency treegraph
 
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
:


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("");        
    }
}


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo