diff options
author | Zipeng WU <zipeng.wu@sonarsource.com> | 2020-12-10 10:03:37 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2020-12-14 20:07:14 +0000 |
commit | 89f05cf116ef15089abb151bb672a02fe679c088 (patch) | |
tree | ef1a1a0e6bf575b1d8a4676be6d4cc0712599435 /server | |
parent | 72b9d7e8614eb89c4d293c4e47177caeea2cd55a (diff) | |
download | sonarqube-89f05cf116ef15089abb151bb672a02fe679c088.tar.gz sonarqube-89f05cf116ef15089abb151bb672a02fe679c088.zip |
InputSteam.read() implementation should not return a signed byte
Diffstat (limited to 'server')
-rw-r--r-- | server/sonar-db-dao/src/main/java/org/sonar/db/ce/LogsIteratorInputStream.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/ce/LogsIteratorInputStream.java b/server/sonar-db-dao/src/main/java/org/sonar/db/ce/LogsIteratorInputStream.java index bef33c06cb5..70d73ed25b2 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/ce/LogsIteratorInputStream.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/ce/LogsIteratorInputStream.java @@ -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() { |