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 227585

Summary: java.io.IOException: Use FileUtil.createData() instead!
Product: projects Reporter: Exceptions Reporter <exceptions_reporter>
Component: LibrariesAssignee: Tomas Zezula <tzezula>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 7.3   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 199680
Attachments: stacktrace

Description Exceptions Reporter 2013-03-17 18:00:56 UTC
This bug was originally marked as duplicate of bug 194735, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 7.3 Beta (Build 201210011125)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.5-b02, Java(TM) SE Runtime Environment, 1.7.0_09-b05
OS: Windows 7

Stacktrace: 
java.io.IOException: Use FileUtil.createData() instead!
   at org.openide.filesystems.AbstractFileObject.createData(AbstractFileObject.java:447)
   at org.openide.filesystems.FileUtil.createData(FileUtil.java:971)
   at org.openide.filesystems.MultiFileObject.createData(MultiFileObject.java:1175)
   at org.openide.filesystems.FileUtil.createData(FileUtil.java:971)
   at org.openide.filesystems.MultiFileObject.createData(MultiFileObject.java:1175)
   at org.netbeans.modules.project.libraries.LibrariesStorage$1.run(LibrariesStorage.java:264)
Comment 1 Exceptions Reporter 2013-03-17 18:00:57 UTC
Created attachment 132716 [details]
stacktrace
Comment 2 Jaroslav Tulach 2013-03-21 09:16:06 UTC
Unless I am mistaken  FileUtil.createData() is guarded against race condition when two threads create the same file. Returns the existing one for the second thread.
Comment 3 Tomas Zezula 2013-06-19 14:45:52 UTC
Fixed jet-main d4c218d31b99
Comment 4 Quality Engineering 2013-06-22 02:05:12 UTC
Integrated into 'main-golden', will be available in build *201306212301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/d4c218d31b99
User: Tomas Zezula <tzezula@netbeans.org>
Log: #227585:java.io.IOException: Use FileUtil.createData() instead!