URL:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=13291>
Summary: java.io.File#createTempFile returns the same file
to different threads
Project: classpath
Submitted by: itokaz
Submitted on: Sat 06/04/05 at 01:38
Category: classpath
Severity: 3 - Normal
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Platform Version: None
_______________________________________________________
Details:
createTempFile uses System.currentTimeMillis() to generate a
temporary file name. So, as the source says itself,
"// XXX - FIXME race condition."
the same file is returned to different threads if they call
createTempFile at the same time.
Using random numbers as Kaffe did before may be safer although
it is not a complete solution, either.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=13291>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Commit-classpath mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-classpath