mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
Remove null check of final field istreams which is never null
This commit is contained in:
parent
a3f06cdc51
commit
388306a7d6
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user