Skip to content

Commit

Permalink
Removes internal throable reference to avoid potential ClassLoader leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Cédric Tabin committed Feb 16, 2023
1 parent 82ff339 commit 1ac8e87
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ private synchronized void closeOpenStreams() {
*/
protected final class SentinelInputStream extends FilterInputStream {
private volatile boolean closed = false;
private final Throwable throwable;
private Throwable throwable;

/**
* Constructs new FilteredInputStream which reports InputStreams not closed properly.
Expand Down Expand Up @@ -1152,6 +1152,7 @@ private synchronized void _close() throws IOException {
// race condition with above check, but should have no harmful effects

closed = true;
throwable = null;
getStreams().remove(this);
super.close();
}
Expand Down

0 comments on commit 1ac8e87

Please sign in to comment.