aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorZipeng WU <zipeng.wu@sonarsource.com>2020-12-10 10:03:37 +0100
committersonartech <sonartech@sonarsource.com>2020-12-14 20:07:14 +0000
commit89f05cf116ef15089abb151bb672a02fe679c088 (patch)
treeef1a1a0e6bf575b1d8a4676be6d4cc0712599435 /server
parent72b9d7e8614eb89c4d293c4e47177caeea2cd55a (diff)
downloadsonarqube-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.java4
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() {