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 210883 - org.openide.filesystems.FileStateInvalidException: C:\Users\Mark\Documents\NetBeansProjects\DevelopingJavaBeans\src\developingjavabeans\ExampleApplet1.java@df423958:bd1c74[invalid]
Summary: org.openide.filesystems.FileStateInvalidException: C:\Users\Mark\Documents\Ne...
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: Jan Becicka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-09 03:26 UTC by MackSix
Modified: 2012-04-11 11:07 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 186800


Attachments
stacktrace (3.86 KB, text/plain)
2012-04-09 03:27 UTC, MackSix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MackSix 2012-04-09 03:26:53 UTC
Build: NetBeans IDE Dev (Build 201204060400)
VM: Java HotSpot(TM) Client VM, 22.1-b02, Java(TM) SE Runtime Environment, 1.7.0_03-b05
OS: Windows Vista

User Comments:
MackSix: 1.) Created New Project. 2.) Created Class file. 3.) Cleared content and pasted code into file. 4.) Renamed Class File to match Class Name. 5.) Error because code in default package but file was in another package named "developingjavabeans". 6.) Used the Hints refactoring of moving file to default package. 7.) Choose file in Files Window and clicked Undo button to Undo rename of file and this happened.




Stacktrace: 
org.openide.filesystems.FileStateInvalidException: C:\Users\Mark\Documents\NetBeansProjects\DevelopingJavaBeans\src\developingjavabeans\ExampleApplet1.java@df423958:bd1c74[invalid]
   at org.openide.loaders.DataObject.find(DataObject.java:521)
   at org.netbeans.modules.refactoring.plugins.FileRenamePlugin$RenameFile.undoChange(FileRenamePlugin.java:130)
   at org.netbeans.modules.refactoring.api.RefactoringSession.undoRefactoring(RefactoringSession.java:193)
   at org.netbeans.modules.refactoring.spi.impl.UndoManager$SessionUndoItem.undo(UndoManager.java:397)
   at org.netbeans.modules.refactoring.spi.impl.UndoManager$1.run(UndoManager.java:195)
   at org.netbeans.modules.refactoring.spi.impl.UndoManager.undo(UndoManager.java:227)
Comment 1 MackSix 2012-04-09 03:27:00 UTC
Created attachment 118003 [details]
stacktrace
Comment 2 MackSix 2012-04-09 03:38:44 UTC
1.) Create new project.
2.) Create new Class file in package "newpackage".
3.) Rename Class file to "NewClassRenamed" and refactor.
4.) Delete the package deceleration in the file so it is in the default package.
5.) Save file.
6.) Click on light bulb with Red badge at top of file and choose "move class to correct folder". Class is moved to "default package".
7.) Put focus on file in Project Window and click the Undo Button.
8.) Click "Yes" on dialog asking to Undo Rename.

This FileStateInvalidException occurs.
Comment 3 Jan Becicka 2012-04-11 11:07:10 UTC
Changeset: 9095605d1999
Author:    Jan Becicka <jbecicka@netbeans.org>
Date:      2012-04-11 13:03
Message:   Issue 210883 - org.openide.filesystems.FileStateInvalidException:
C:\Users\Mark\Documents\NetBeansProjects\DevelopingJavaBeans\src\developingjavabeans\ExampleApplet1.java@df423958:bd1c74[invalid]
Issue #210104 - [72cat] IllegalArgumentException: Called DataObject.find on
null