]> source.dussan.org Git - sonarqube.git/commitdiff
InputSteam.read() implementation should not return a signed byte
authorZipeng WU <zipeng.wu@sonarsource.com>
Thu, 10 Dec 2020 09:03:37 +0000 (10:03 +0100)
committersonartech <sonartech@sonarsource.com>
Mon, 14 Dec 2020 20:07:14 +0000 (20:07 +0000)
server/sonar-db-dao/src/main/java/org/sonar/db/ce/LogsIteratorInputStream.java

index bef33c06cb55f990a614e36c261aa2659126cd1a..70d73ed25b218786b903372c1edfe30effbb396d 100644 (file)
@@ -55,7 +55,9 @@ final class LogsIteratorInputStream extends InputStream {
         return END_OF_STREAM;
       }
     }
-    return buf[nextChar++];
+    byte signedByte = buf[nextChar];
+    nextChar++;
+    return signedByte & 0xFF;
   }
 
   private void fill() {