Remove null check of final field istreams which is never null

This commit is contained in:
Eirik Bjorsnos 2026-01-27 10:26:27 +01:00
parent a3f06cdc51
commit 388306a7d6

View File

@ -760,23 +760,22 @@ public class ZipFile implements ZipConstants, Closeable {
}
// Close streams, release their inflaters
if (istreams != null) {
synchronized (istreams) {
if (!istreams.isEmpty()) {
InputStream[] copy = istreams.toArray(new InputStream[0]);
istreams.clear();
for (InputStream is : copy) {
try {
is.close();
} catch (IOException e) {
if (ioe == null) ioe = e;
else ioe.addSuppressed(e);
}
synchronized (istreams) {
if (!istreams.isEmpty()) {
InputStream[] copy = istreams.toArray(new InputStream[0]);
istreams.clear();
for (InputStream is : copy) {
try {
is.close();
} catch (IOException e) {
if (ioe == null) ioe = e;
else ioe.addSuppressed(e);
}
}
}
}
// Release ZIP src
if (zsrc != null) {
synchronized (zsrc) {