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 205069 - [71cat] Throwable: Locked by:
Summary: [71cat] Throwable: Locked by:
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.1
Hardware: All All
: P4 normal (vote)
Assignee: Jan Becicka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-14 08:52 UTC by MackSix
Modified: 2012-04-23 20:08 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 182871


Attachments
stacktrace (6.66 KB, text/plain)
2011-11-14 08:52 UTC, MackSix
Details
Project that exhibits the error. (24.61 KB, application/zip)
2011-11-14 14:39 UTC, MackSix
Details
stacktrace (1.82 KB, text/plain)
2012-02-22 11:37 UTC, aldobrucale
Details
stacktrace (5.93 KB, text/plain)
2012-04-01 07:29 UTC, MackSix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MackSix 2011-11-14 08:52:26 UTC
Build: NetBeans IDE Dev (Build 201111120600)
VM: Java HotSpot(TM) Client VM, 21.1-b02, Java(TM) SE Runtime Environment, 1.7.0_01-b08
OS: Windows Vista

User Comments:
MackSix: 1) Do Refactor>>Extract Superclass>>Refactor on a class.
2) View Superclass file and press the undo button. 
3) View class file the refactoring was exected on and do Refactor>>Undo[Extract Superclass] 

This exception is thrown.




Stacktrace: 
java.lang.Throwable: Locked by:
   at org.openide.filesystems.FileLock.<init>(FileLock.java:83)
   at org.netbeans.modules.masterfs.filebasedfs.fileobjects.LockForFile.<init>(LockForFile.java:91)
   at org.netbeans.modules.masterfs.filebasedfs.fileobjects.LockForFile.tryLock(LockForFile.java:102)
   at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.lock(FileObj.java:353)
   at org.openide.loaders.MultiDataObject$Entry.takeLock(MultiDataObject.java:1352)
   at org.netbeans.modules.openide.loaders.SimpleES$Environment.takeLock(SimpleES.java:188)
Comment 1 MackSix 2011-11-14 08:52:29 UTC
Created attachment 113177 [details]
stacktrace
Comment 2 Jan Becicka 2011-11-14 14:22:07 UTC
cannot reproduce.
Comment 3 MackSix 2011-11-14 14:39:16 UTC
Created attachment 113192 [details]
Project that exhibits the error.

Try this projects and these steps:

1) Open project and open NewClass.java
2) Right click on editor and choose Refactor>>Extract Superclass
3) Choose d, x, z and their getter & setter methods.
4) Change Superclass Name to SuperNewClass.
5) Click Refactor button.
6) Double Click SuperNewClass.java in project window to open it in Editor.
7) Click the Undo Button.
8) Right Click on SuperNewClass or NewClass Editor views and choose Refactor>>Undo[Extract Superclass]
Comment 4 Jan Becicka 2011-11-14 14:54:57 UTC
still works for me.
Comment 5 MackSix 2011-11-14 15:38:50 UTC
I tried it on 2 other computers. One with Windows XP and another with Windows 7 and I still get this error. Now I am hungry. :)
Comment 6 aldobrucale 2012-02-22 11:37:59 UTC
Created attachment 116016 [details]
stacktrace

undo an extract superclass refactoring; I had probably already modified the newly created superclass
Comment 7 MackSix 2012-04-01 07:29:21 UTC
Created attachment 117599 [details]
stacktrace

Undo fields moved to Super Class by Refactoring>>Extract Super Class
Comment 8 Jan Becicka 2012-04-02 07:38:42 UTC
Undo was rewritten for 7.2. Probably fixed.
Comment 9 MackSix 2012-04-02 08:06:29 UTC
(In reply to comment #8)
> Undo was rewritten for 7.2. Probably fixed.

This was:

Product Version: NetBeans IDE Dev (Build 201203280401)
Java: 1.7.0_03; Java HotSpot(TM) Client VM 22.1-b02
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)

Are you saying it has been rewritten since this build?
Comment 10 Jan Becicka 2012-04-20 13:52:22 UTC
Are you still able to reproduce?
Comment 11 Jan Becicka 2012-04-23 15:56:33 UTC
I really think, that it is not reproducible
Comment 12 MackSix 2012-04-23 20:08:12 UTC
(In reply to comment #11)
> I really think, that it is not reproducible

I get an exception now when I try to undo it.

http://netbeans.org/bugzilla/show_bug.cgi?id=211607