I'm checking this in.
This fixes a bug in one of the new 1.5 Long methods that was pointed
out by some Mauve tests I wrote.
Tom
Index: ChangeLog
from Tom Tromey <[EMAIL PROTECTED]>
* java/lang/Long.java (reverse): Correctly handle sign extension.
Index: java/lang/Long.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/lang/Long.java,v
retrieving revision 1.22
diff -u -r1.22 Long.java
--- java/lang/Long.java 17 Sep 2005 21:58:41 -0000 1.22
+++ java/lang/Long.java 18 Sep 2005 22:24:48 -0000
@@ -657,9 +657,9 @@
*/
public static long reverse(long val)
{
- int hi = Integer.reverse((int) val);
- int lo = Integer.reverse((int) (val >>> 32));
- return (((long) hi) << 32) | lo;
+ long hi = Integer.reverse((int) val) & 0xffffffffL;
+ long lo = Integer.reverse((int) (val >>> 32)) & 0xffffffffL;
+ return (hi << 32) | lo;
}
/**
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches