Commit dd168666 by Tom Tromey Committed by Tom Tromey

File.java (createTempFile): Use low bits from counter, not high bits.

	* java/io/File.java (createTempFile): Use low bits from counter,
	not high bits.

From-SVN: r31946
parent d1e51320
2000-02-12 Tom Tromey <tromey@cygnus.com>
* java/io/File.java (createTempFile): Use low bits from counter,
not high bits.
Fri Feb 11 19:48:08 2000 Anthony Green <green@cygnus.com> Fri Feb 11 19:48:08 2000 Anthony Green <green@cygnus.com>
* THANKS: More thanks. * THANKS: More thanks.
......
...@@ -256,7 +256,8 @@ public class File implements Serializable ...@@ -256,7 +256,8 @@ public class File implements Serializable
for (int i = 0; i < 100; ++i) for (int i = 0; i < 100; ++i)
{ {
// This is ugly. // This is ugly.
String l = prefix + (nextValue () + "ZZZZZZ").substring(0,6) + suffix; String t = "ZZZZZZ" + nextValue ();
String l = prefix + t.substring(t.length() - 6) + suffix;
try try
{ {
desc.open (l, FileDescriptor.WRITE | FileDescriptor.EXCL); desc.open (l, FileDescriptor.WRITE | FileDescriptor.EXCL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment