mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8281962: Avoid unnecessary native calls in InflaterInputStream
Reviewed-by: clanger, redestad, alanb, lancea
This commit is contained in:
parent
e1060bee2a
commit
378fa507a2
2 changed files with 116 additions and 2 deletions
|
@ -150,7 +150,7 @@ public class InflaterInputStream extends FilterInputStream {
|
|||
}
|
||||
try {
|
||||
int n;
|
||||
while ((n = inf.inflate(b, off, len)) == 0) {
|
||||
do {
|
||||
if (inf.finished() || inf.needsDictionary()) {
|
||||
reachEOF = true;
|
||||
return -1;
|
||||
|
@ -158,7 +158,7 @@ public class InflaterInputStream extends FilterInputStream {
|
|||
if (inf.needsInput()) {
|
||||
fill();
|
||||
}
|
||||
}
|
||||
} while ((n = inf.inflate(b, off, len)) == 0);
|
||||
return n;
|
||||
} catch (DataFormatException e) {
|
||||
String s = e.getMessage();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue