Patch: bug fix for File.java

Tom Tromey tromey@cygnus.com
Fri Feb 11 10:42:00 GMT 2000


I'm committing this patch.
It ensures that the new File.createTempFile will never return the same
filename twice.

2000-02-11  Tom Tromey  <tromey@cygnus.com>

	* java/io/File.java (nextValue): Now synchronized.

Tom

Index: java/io/File.java
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/io/File.java,v
retrieving revision 1.5
diff -u -r1.5 File.java
--- File.java	2000/02/11 17:32:52	1.5
+++ File.java	2000/02/11 18:15:47
@@ -215,7 +215,7 @@
     return mkdirs (new File (path));
   }
 
-  private static String nextValue ()
+  private static synchronized String nextValue ()
   {
     return Long.toString(counter++, Character.MAX_RADIX);
   }


More information about the Java-patches mailing list