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 100302 - [rename type] Rename Type should return a warning related to change current behavior
Summary: [rename type] Rename Type should return a warning related to change current b...
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P4 blocker (vote)
Assignee: issues@java
URL:
Keywords:
: 100301 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-04-07 20:05 UTC by kely_garcia
Modified: 2009-11-02 11: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 kely_garcia 2007-04-07 20:05:44 UTC
Build 200703271800

Rename Type should return a warning when the refactoring will change the 
current behavior. 
Steps to reproduce: Rename Type A to B in the following:
class A{
	   static int length = 17;
	   int m(int[] B){
	     return A.length;
	   }
}

yields the following refactored class:
class B{
	   static int length = 17;
	   int m(int[] B){
	     return B.length;
	   }
}

Note: The same problem occurs when B is a field, a local variable or a 
parameter of Class A or a Class that makes reference to A.length. In addition, 
B can be declared in an interface or class like in the following 2 cases:
- Rename A to B, where field B is declared in interface I
public class A{
	public static int length(){ return 0;};
}
interface I{
	String B= "fred";
}
class FF implements I{
	int m(){
		return A.length();
	}
}

- Rename A to B where field B is declared in class F
public class A{
	public static int length(){ return 0;};
}
class F{
	String B;
}
class FF extends F{
	int m(){
		return A.length();
	}
}
Comment 1 Jan Becicka 2007-06-29 10:03:26 UTC
Reproducible only for types. Field and local variable rename is correct.
Comment 2 Jan Becicka 2007-06-29 10:17:15 UTC
*** Issue 100301 has been marked as a duplicate of this issue. ***
Comment 3 David Strupl 2009-03-31 15:55:38 UTC
Resolving all issues with milestone "future" as LATER. If you feel strongly that
it should be implemented please reopen and set the target milestone to "next".
Comment 4 Quality Engineering 2009-11-02 11:14:55 UTC
NetBeans.org Migration: changing resolution from LATER to WONTFIX