Skip readStream optimization for compatibility with misbehaving InputStreams
Closes gh-27429
This commit is contained in:
parent
09a1b87d37
commit
eabe946a53
|
|
@ -324,7 +324,9 @@ public class ClassReader {
|
|||
}
|
||||
outputStream.flush();
|
||||
if (readCount == 1) {
|
||||
return data;
|
||||
// SPRING PATCH: some misbehaving InputStreams return -1 but still write to buffer (gh-27429)
|
||||
// return data;
|
||||
// END OF PATCH
|
||||
}
|
||||
return outputStream.toByteArray();
|
||||
} finally {
|
||||
|
|
|
|||
Loading…
Reference in New Issue