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 254929 - After moving two classes to different package, undo brings back both but leaves one file undeleted
Summary: After moving two classes to different package, undo brings back both but leav...
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 8.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-02 10:03 UTC by gokumar
Modified: 2015-09-02 17:58 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (131.53 KB, text/plain)
2015-09-02 10:03 UTC, gokumar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gokumar 2015-09-02 10:03:27 UTC
Link: http://services.netbeans.org/synergy/client/app/#/case/5113/suite/2020

Product Version = NetBeans IDE Dev (Build 201508310002)
Operating System = Linux version 3.16.0-40-generic running on amd64
Java; VM; Vendor = 1.8.0_45
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.45-b02

Reproducibility: Tried, but couldn't reproduce it

STEPS:
1. Select both classes ClassA.java and ClassB.java in package usages
2. From main menu selet Refactor > Move...
3. In occurred dialog select package move and press Preview
4. Inspect all changes and press Do Refactoring
5. Ensure that ClassA and ClassB have been moved correctly and project is still compilable
6. Press undo and confirm dialog

ACTUAL:
- Both classes ClassA.java and ClassB.java have been moved to package move
- All necessary imports have been properly resolved
- Code is every time compilable
- After step 6, these classes are moved back to "usages" package, but ClassA remains undeleted in "move" package. I tried to reproduce this issue, but without luck.

EXPECTED:
- Both classes ClassA.java and ClassB.java have been moved to package move
- All necessary imports have been properly resolved
- Code is every time compilable
- Undo works as expecte
Comment 1 gokumar 2015-09-02 10:03:38 UTC
Created attachment 155820 [details]
IDE log
Comment 2 gokumar 2015-09-02 10:21:07 UTC
Link: http://services.netbeans.org/synergy/client/app/#/case/5114/suite/2020

I am able to reproduce this issue for Enum move testcase. When I Undo, MyEnum.java is now present in both "usages" and "move" packages.
Comment 3 Jiri Kovalsky 2015-09-02 17:58:37 UTC
Reassigning for further evaluation.