[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] Patch: FYI: confusing code in File
From: |
Tom Tromey |
Subject: |
[cp-patches] Patch: FYI: confusing code in File |
Date: |
09 Nov 2004 20:30:16 -0700 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
I'm checking this in.
This removes a couple of useless casts, plus an explicit and wasted
int->long extension inside the loop.
Tom
2004-11-09 Tom Tromey <address@hidden>
* java/io/File.java (directory.getName): Removed redundant cast.
Changed "mask" to be of type "long".
Index: io/File.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/io/File.java,v
retrieving revision 1.52
diff -u -r1.52 File.java
--- io/File.java 8 Nov 2004 09:21:26 -0000 1.52
+++ io/File.java 10 Nov 2004 03:33:19 -0000
@@ -1118,7 +1118,7 @@
if (prefix.length() >= 8)
throw new IllegalArgumentException("Prefix too long: " + prefix +
"(valid length 3..7)");
- int mask = (int) (0x000000ffffFFFFL >> (long) (prefix.length() * 4));
+ long mask = 0x000000ffffFFFFL >> (prefix.length() * 4);
do
{
int n = (int) (System.currentTimeMillis() & mask);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] Patch: FYI: confusing code in File,
Tom Tromey <=