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 241952 - Method: Java refactoring sanity test
Summary: Method: Java refactoring sanity test
Status: RESOLVED DUPLICATE of bug 241466
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 8.0
Hardware: PC Mac OS X
: P2 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-16 18:48 UTC by kimsp
Modified: 2014-02-17 06:58 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Showing error in classB (208.35 KB, image/png)
2014-02-16 18:48 UTC, kimsp
Details
from constants II (188.84 KB, image/png)
2014-02-16 18:58 UTC, kimsp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kimsp 2014-02-16 18:48:02 UTC
Created attachment 145261 [details]
Showing error in classB

What I did:

Open rename.ClassB.java, put caret into method name a.meth|od (where '|' is a position of carret)
By Ctrl+R invoke Rename dialog
Type new name e.g "renamedMethod"
Press Preview and inspect changes
Press "Refresh the refactoring data" (green button with cycling arrows)
Type new name e.g "renamedMethod1" and press Refactor

Then I went to ClassA to see the changed method, and then I pressed Undo (still in ClassA). Then I saw that ClassB got and error marker (both in the editor and the projects view). See attached screen dump.

The errors went away once I clicked to see the contents of the editor with classA, but it should newer have been there to start with.
Comment 1 kimsp 2014-02-16 18:58:37 UTC
The same (failed) behavior is also provokable from the Constants II test:

Open rename.ClassB.java, put caret into constant name System.out.println("ID of a is: " + a.i|d); (where '|' is a position of caret)
By Ctrl+R invoke Rename dialog
Type new name e.g "myId"
Press Preview
Press Do Refactoring

Go to ClassA, and see that ClassB has error badge (both editor and in projects view).

see screen dump
Comment 2 kimsp 2014-02-16 18:58:56 UTC
Created attachment 145262 [details]
from constants II
Comment 3 kimsp 2014-02-16 19:11:12 UTC
For the constants II test you also need to press undo (I forgot to say that)
Comment 4 Jiri Prox 2014-02-17 06:58:15 UTC
You have to save the actual file to get rid of error badges, or invoke undo from project view

*** This bug has been marked as a duplicate of bug 241466 ***