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
This commit is contained in:
Tom Tromey 2000-02-12 20:13:42 +00:00 committed by Tom Tromey
parent d1e5132060
commit dd16866663
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
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>
* THANKS: More thanks.

View File

@ -256,7 +256,8 @@ public class File implements Serializable
for (int i = 0; i < 100; ++i)
{
// 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
{
desc.open (l, FileDescriptor.WRITE | FileDescriptor.EXCL);