You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2014/09/17 15:00:42 UTC

svn commit: r1625564 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/bcel/ java/org/apache/tomcat/util/bcel/classfile/FastDataInputStream.java

Author: markt
Date: Wed Sep 17 13:00:41 2014
New Revision: 1625564

URL: http://svn.apache.org/r1625564
Log:
Review comments from kkolinko
Port of 1625563 from trunk

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/   (props changed)
    tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/FastDataInputStream.java

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1625563

Propchange: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/
------------------------------------------------------------------------------
  Merged /tomcat/trunk/java/org/apache/tomcat/util/bcel:r1625563

Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/FastDataInputStream.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/FastDataInputStream.java?rev=1625564&r1=1625563&r2=1625564&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/FastDataInputStream.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/FastDataInputStream.java Wed Sep 17 13:00:41 2014
@@ -109,7 +109,7 @@ class FastDataInputStream extends Buffer
         }
         int ch1 = this.buf[pos++] & 0xff;
         int ch2 = this.buf[pos++] & 0xff;
-        return (short)((ch1 << 8) + (ch2 << 0));
+        return (short)((ch1 << 8) + ch2);
     }
 
 
@@ -122,7 +122,7 @@ class FastDataInputStream extends Buffer
 
         int ch1 = this.buf[pos++] & 0xff;
         int ch2 = this.buf[pos++] & 0xff;
-        return (ch1 << 8) + (ch2 << 0);
+        return (ch1 << 8) + ch2;
     }
 
 
@@ -134,7 +134,7 @@ class FastDataInputStream extends Buffer
         }
         int ch1 = this.buf[pos++] & 0xff;
         int ch2 = this.buf[pos++] & 0xff;
-        return (char)((ch1 << 8) + (ch2 << 0));
+        return (char)((ch1 << 8) + ch2);
     }
 
 
@@ -148,7 +148,7 @@ class FastDataInputStream extends Buffer
         int ch2 = this.buf[pos++] & 0xff;
         int ch3 = this.buf[pos++] & 0xff;
         int ch4 = this.buf[pos++] & 0xff;
-        return ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + (ch4 << 0));
+        return ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + ch4);
     }
 
 
@@ -162,7 +162,7 @@ class FastDataInputStream extends Buffer
                 ((long)(readBuffer[4] & 255) << 24) +
                 ((readBuffer[5] & 255) << 16) +
                 ((readBuffer[6] & 255) <<  8) +
-                ((readBuffer[7] & 255) <<  0));
+                (readBuffer[7] & 255));
     }
 
 
@@ -208,7 +208,6 @@ class FastDataInputStream extends Buffer
             while (sum < n && (cur = (int) in.skip(n - sum)) > 0) {
                 sum += cur;
             }
-            fillNew();
             return sum;
         }
         // Data in the buffer is not enough
@@ -220,7 +219,6 @@ class FastDataInputStream extends Buffer
             while (sum < n && (cur = (int) in.skip(n - sum)) > 0) {
                 sum += cur;
             }
-            fillNew();
             return sum;
         }
         pos += n;
@@ -231,6 +229,6 @@ class FastDataInputStream extends Buffer
     @Override
     public String readLine() throws IOException {
         // Unimplemented
-        throw new IOException();
+        throw new UnsupportedOperationException();
     }
 }
\ No newline at end of file



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