Merge pull request #12472 from jsgrah-spring/master

close #12095
This commit is contained in:
kwoyke 2022-07-12 10:17:01 +02:00 committed by GitHub
commit ce2ecef1e7
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ public class InputStreamToOutputStreamUnitTest {
void copy(InputStream source, OutputStream target) throws IOException {
byte[] buf = new byte[8192];
int length;
while ((length = source.read(buf)) > 0) {
while ((length = source.read(buf)) != -1) {
target.write(buf, 0, length);
}
}