Skip to content

Commit 9395269

Browse files
committed
Don't preemptively close
As we may get reset and later try to hit available(), which will throw an IOException in JDK 8. Related to the change from bd92bca
1 parent bd92bca commit 9395269

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/main/java/org/jsoup/internal/SimpleBufferedInput.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,7 @@ private void fill() throws IOException {
8989
capRemaining -= read;
9090
}
9191
}
92-
closeIfDone(read);
93-
}
94-
95-
private void closeIfDone(int read) throws IOException {
96-
if (read == -1) {
97-
inReadFully = true;
98-
super.close(); // close underlying stream immediately; frees resources a little earlier
99-
}
92+
if (read == -1) inReadFully = true;
10093
}
10194

10295
byte[] getBuf() {

0 commit comments

Comments
 (0)