commit-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commit-cp] [bug #13291] java.io.File#createTempFile returns the same fi


From: Ito Kazumitsu
Subject: [commit-cp] [bug #13291] java.io.File#createTempFile returns the same file to different threads
Date: Sat, 4 Jun 2005 01:38:55 +0000
User-agent: w3m/0.5.1

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/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]