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.
Add FileObject.getOutputStream without FileLock as a parameter
Created attachment 30201 [details] diff
Please review.
Yes please. I am so sick of asking for a FileLock every time I write to a file. Really clutters code. This should be an improvement. s/occures/occurs/ What happens if getOutputStream(lock) throws IOE? I guess lock does not get released. Missing @since.
Created attachment 30234 [details] impl. reflecting Jesse's comments + tests
IMHO it would be nicer to replace } catch(IOException iex) { with } finally { in both cases. And remove the "throw iex;". This would be more robust in case of other exceptions... and a bit shorter ;-)
Oops, the last comment applies just for the inner class!
/cvs/openide/fs/test/unit/src/org/openide/filesystems/FileObject75826Test.java,v initial revision: 1.1 /cvs/openide/fs/test/unit/src/org/openide/filesystems/FileObjectTestHid.java,v new revision: 1.6; previous revision: 1.5 /cvs/openide/fs/manifest.mf,v <-- manifest.mf new revision: 1.7; previous revision: 1.6 /cvs/openide/fs/apichanges.xml,v <-- apichanges.xml new revision: 1.7; previous revision: 1.6 /cvs/openide/fs/src/org/openide/filesystems/FileObject.java,v <-- FileObject.java new revision: 1.8; previous revision: 1.7