close #12095
This commit is contained in:
parent
97b2c4d6ea
commit
535abc8f7a
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user