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 254694 - After "Extract Superclass" action, I Undo and see an error popup.
Summary: After "Extract Superclass" action, I Undo and see an error popup.
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
: 254696 254921 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-08-25 10:40 UTC by gokumar
Modified: 2015-09-04 09:35 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
After "Extract Superclass" action, I Undo and see an error popup. (12.52 KB, image/png)
2015-08-25 10:40 UTC, gokumar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gokumar 2015-08-25 10:40:19 UTC
Created attachment 155610 [details]
After "Extract Superclass" action, I Undo and see an error popup.

Link: http://services.netbeans.org/synergy/client/app/#/case/5138/suite/2025

After "Extract Superclass" action, I Undo and see an error popup.
Comment 1 Jiri Prox 2015-08-25 13:31:42 UTC
*** Bug 254696 has been marked as a duplicate of this bug. ***
Comment 2 Jiri Prox 2015-09-02 11:34:24 UTC
I cannot reproduce this issue.

Can you please verify that the file is not locked in the OS? (opened in external editor etc...)
Comment 3 gokumar 2015-09-02 12:17:00 UTC
I am able to reproduce this error. I was able to access this file externally as well.

http://services.netbeans.org/synergy/client/app/#/case/5138/suite/2025/v/1

Product Version: NetBeans IDE Dev (Build 201508240002)
Updates: Updates available
Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b14
System: Windows 7 version 6.1 running on amd64; Cp1252; en_IN (nb)
User directory: C:\Users\GOKUMAR\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\GOKUMAR\AppData\Local\NetBeans\Cache\dev

Steps:
1. Open extract.ClassB.java class
2. Right click in the body of class and from pop-up menu select Refactor > Extract Superclass...
3. In Extract Superclass dialog type Superclass name (in my case, i named it as "SuperClass"), check all methods and press Preview
4. Inspect changes and press Do Refactoring
5. Press undo and confirm dialog
6. Press redo and confirm
7. Press undo again and confirm

Actual Results:
- Preview correctly shows all changes
- SuperClass is created and ClassB is correctly updated
- Code is every time compilable
- Undo does not work and I see the error (same as attached)

Expected Results:
- Preview correctly shows all changes
- SuperClass is created and ClassB is correctly updated
- Code is every time compilable
- Undo/Redo works properly as expected
Comment 4 gokumar 2015-09-02 15:13:58 UTC
Link: http://services.netbeans.org/synergy/client/app/#/case/5117/suite/2021

I see the same problem with this test case. 

Steps
1. Holding key Ctrl drag ClassA.java from package usages to package move
2. In occurred dialog type new name, press Preview and inspect all changes
Press Do refactoring
3. Ensure that ClassA has been copied correctly and project is still compilable
4. Press undo and confirm dialog

Actual Result:
Movement works correctly. But, when I Undo, I see similar error. In the background, undo actually works.

Expected Result:
Movement and Undo should work normally.
Comment 5 gokumar 2015-09-03 03:42:23 UTC
Link: http://services.netbeans.org/synergy/client/app/#/case/5137/suite/2025

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

I am able to reproduce this on Ubuntu as well.
Comment 6 Jiri Prox 2015-09-03 15:35:12 UTC
*** Bug 254921 has been marked as a duplicate of this bug. ***
Comment 7 gokumar 2015-09-04 09:35:43 UTC
I believe there is a general problem.
For any file that is created automatically as part of some refactoring, Undo breaks. It says cannot delete that particular file. I got similar error for Test case http://services.netbeans.org/synergy/client/app/#/case/5160