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 75826 - Add FileObject.getOutputStream without FileLock as a parameter
Summary: Add FileObject.getOutputStream without FileLock as a parameter
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: rmatous
URL:
Keywords: API, API_REVIEW_FAST
Depends on:
Blocks:
 
Reported: 2006-05-03 11:02 UTC by rmatous
Modified: 2008-12-22 23:35 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
diff (3.90 KB, patch)
2006-05-03 11:08 UTC, rmatous
Details | Diff
impl. reflecting Jesse's comments + tests (9.62 KB, patch)
2006-05-04 10:30 UTC, rmatous
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description rmatous 2006-05-03 11:02:14 UTC
Add FileObject.getOutputStream without FileLock as a parameter
Comment 1 rmatous 2006-05-03 11:08:56 UTC
Created attachment 30201 [details]
diff
Comment 2 rmatous 2006-05-03 11:13:17 UTC
Please review.
Comment 3 Jesse Glick 2006-05-03 17:00:41 UTC
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.
Comment 4 rmatous 2006-05-04 10:30:14 UTC
Created attachment 30234 [details]
impl. reflecting Jesse's comments + tests
Comment 5 Martin Entlicher 2006-05-04 15:22:55 UTC
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 ;-)
Comment 6 Martin Entlicher 2006-05-04 15:24:29 UTC
Oops, the last comment applies just for the inner class!
Comment 7 rmatous 2006-05-11 15:36:49 UTC
/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