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 224968

Summary: NPE: as refactorings calls DataObject.rename(null)
Product: java Reporter: MackSix
Component: RefactoringAssignee: Ralph Ruijs <ralphbenjamin>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: P3    
Version: 7.3   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 197632
Attachments: stacktrace

Description MackSix 2013-01-16 14:02:11 UTC
This bug was originally marked as duplicate of bug 193654, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 201301160001)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.6-b04, Java(TM) SE Runtime Environment, 1.7.0_11-b21
OS: Windows 7

User Comments:
MackSix: 1. Renamed 2 packages 2 times. 2. Closed the project and reopened it. 3. Uno rename once, then Undo again. This exception was thrown.




Stacktrace: 
java.lang.NullPointerException
   at org.openide.loaders.DataFolder.confirmName(DataFolder.java:1149)
   at org.openide.loaders.DataFolder.handleRename(DataFolder.java:685)
   at org.openide.loaders.DataObject$1Op.run(DataObject.java:709)
   at org.openide.loaders.DataObject$1WrapRun.run(DataObject.java:907)
   at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:127)
   at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:609)
Comment 1 MackSix 2013-01-16 14:02:13 UTC
Created attachment 130284 [details]
stacktrace
Comment 2 MackSix 2013-01-16 14:21:10 UTC
I can't reproduce it now. The other day I was doing the same thing and had another NullPointerException reported here: http://netbeans.org/bugzilla/show_bug.cgi?id=224777
Comment 3 Jaroslav Tulach 2013-01-17 08:12:38 UTC
I have added an earlier check into the code, but the root problem is 

refactoring.plugins.FileRenamePlugin$RenameFile.undoChange(FileRenamePlugin.java:135)

calling DataObject.rename(null). After my 5139b6625896 change you'll get IAE.
Comment 4 Quality Engineering 2013-01-18 02:50:29 UTC
Integrated into 'main-golden', will be available in build *201301180001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/5139b6625896
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #224968: Detect null soon and throw IllegalArgumentException
Comment 5 Quality Engineering 2015-02-04 03:29:26 UTC
Reported for 7.3.x or earlier, no new info since then -> closing as worksforme, please reopen in case you see it.