SPR-17492: FastByteArrayOutputStream.read byte-to-int conversion

This commit is contained in:
Vojtech Janota
2018-11-13 22:04:46 +01:00
committed by Juergen Hoeller
parent 88cb126511
commit 12f168290d
2 changed files with 11 additions and 1 deletions

View File

@@ -367,7 +367,7 @@ public class FastByteArrayOutputStream extends OutputStream {
else {
if (this.nextIndexInCurrentBuffer < this.currentBufferLength) {
this.totalBytesRead++;
return this.currentBuffer[this.nextIndexInCurrentBuffer++];
return this.currentBuffer[this.nextIndexInCurrentBuffer++] & 0xFF;
}
else {
if (this.buffersIterator.hasNext()) {