coverity#1326429 Dereference null return value

Change-Id: Ib047f6cb255610422afb423006b58e0da7eacead
This commit is contained in:
Caolán McNamara
2015-10-22 09:37:38 +01:00
parent 2092a029bb
commit 9740a474a4

View File

@@ -207,13 +207,12 @@ public class UCBStreamHandler extends URLStreamHandler {
InputStream is) throws
IOException {
ZipEntry entry;
ZipInputStream zis = new ZipInputStream(is);
while (zis.available() != 0) {
entry = zis.getNextEntry();
ZipEntry entry = zis.getNextEntry();
if (entry.getName().equals(file)) {
if (entry != null && entry.getName().equals(file)) {
return zis;
}
}
@@ -275,4 +274,4 @@ public class UCBStreamHandler extends URLStreamHandler {
return result;
}
}
}