You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by gg...@apache.org on 2006/03/21 01:09:49 UTC

svn commit: r387353 - /jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/EndianUtils.java

Author: ggregory
Date: Mon Mar 20 16:09:47 2006
New Revision: 387353

URL: http://svn.apache.org/viewcvs?rev=387353&view=rev
Log:
Remove unnecessary casts from int to int.

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/viewcvs/jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/EndianUtils.java?rev=387353&r1=387352&r2=387353&view=diff
==============================================================================
--- 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 Mon Mar 20 16:09:47 2006
@@ -140,7 +140,7 @@
      * @return the value read
      */
     public static int readSwappedUnsignedShort(byte[] data, int offset) {
-        return (int)( ( ( data[ offset + 0 ] & 0xff ) << 0 ) +
+        return ( ( ( data[ offset + 0 ] & 0xff ) << 0 ) +
             ( ( data[ offset + 1 ] & 0xff ) << 8 ) );
     }
 
@@ -166,7 +166,7 @@
      * @return the value read
      */
     public static int readSwappedInteger(byte[] data, int offset) {
-        return (int)( ( ( data[ offset + 0 ] & 0xff ) << 0 ) +
+        return ( ( ( data[ offset + 0 ] & 0xff ) << 0 ) +
             ( ( data[ offset + 1 ] & 0xff ) << 8 ) +
             ( ( data[ offset + 2 ] & 0xff ) << 16 ) +
             ( ( data[ offset + 3 ] & 0xff ) << 24 ) );
@@ -311,7 +311,7 @@
         int value1 = read( input );
         int value2 = read( input );
 
-        return (int)( ( ( value1 & 0xff ) << 0 ) +
+        return ( ( ( value1 & 0xff ) << 0 ) +
             ( ( value2 & 0xff ) << 8 ) );
     }
 
@@ -346,7 +346,7 @@
         int value3 = read( input );
         int value4 = read( input );
 
-        return (int)( ( ( value1 & 0xff ) << 0 ) +
+        return ( ( ( value1 & 0xff ) << 0 ) +
             ( ( value2 & 0xff ) << 8 ) +
             ( ( value3 & 0xff ) << 16 ) +
             ( ( value4 & 0xff ) << 24 ) );



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org