You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ba...@apache.org on 2006/12/09 01:31:41 UTC
svn commit: r484864 -
/jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/EndianUtils.java
Author: bayard
Date: Fri Dec 8 16:31:40 2006
New Revision: 484864
URL: http://svn.apache.org/viewvc?view=rev&rev=484864
Log:
Applying Robert Michel's more correct patch for #IO-101.
Modified:
jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/EndianUtils.java
Modified: jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/EndianUtils.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/EndianUtils.java?view=diff&rev=484864&r1=484863&r2=484864
==============================================================================
--- jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/EndianUtils.java (original)
+++ jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/EndianUtils.java Fri Dec 8 16:31:40 2006
@@ -218,13 +218,13 @@
( ( data[ offset + 0 ] & 0xff ) << 0 ) +
( ( data[ offset + 1 ] & 0xff ) << 8 ) +
( ( data[ offset + 2 ] & 0xff ) << 16 ) +
- ( ( (long) ( data[ offset + 3 ] & 0xff ) ) << 24 );
+ ( ( data[ offset + 3 ] & 0xff ) << 24 );
long high =
( ( data[ offset + 4 ] & 0xff ) << 0 ) +
( ( data[ offset + 5 ] & 0xff ) << 8 ) +
( ( data[ offset + 6 ] & 0xff ) << 16 ) +
- ( ( (long) ( data[ offset + 7 ] & 0xff ) ) << 24 );
- return low + (high << 32);
+ ( ( data[ offset + 7 ] & 0xff ) << 24 );
+ return ((long) high << 32) + (0xffffffffL & low);
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org