Bug 32363 - File.createNewFile must fail if file already exists
Summary: File.createNewFile must fail if file already exists
Status: UNCONFIRMED
Alias: None
Product: classpath
Classification: Unclassified
Component: classpath (show other bugs)
Version: unspecified
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-16 03:29 UTC by zyridium@zyridium.net
Modified: 2007-07-13 14:17 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Possible fix (not fully tested) (434 bytes, patch)
2007-06-16 03:30 UTC, zyridium@zyridium.net
Details | Diff
Test case. (259 bytes, text/plain)
2007-07-13 14:17 UTC, zyridium@zyridium.net
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zyridium@zyridium.net 2007-06-16 03:29:41 UTC
File.createNewFile must not succeed if the file exists.

I will attach a possible fix.
Comment 1 zyridium@zyridium.net 2007-06-16 03:30:31 UTC
Created attachment 13712 [details]
Possible fix (not fully tested)
Comment 2 zyridium@zyridium.net 2007-07-13 14:17:47 UTC
Created attachment 13910 [details]
Test case.

Run this in a directory where you have permission to create a file. It will create a file called simpletestcase.