JarFile.java (verifyHashes): Check whether ZipEntry exists.

* java/util/jar/JarFile.java (verifyHashes): Check whether ZipEntry
       exists.

From-SVN: r95347
This commit is contained in:
Mark Wielaard 2005-02-21 20:29:00 +00:00 committed by Mark Wielaard
parent 95b49c6f9d
commit c149185b71
2 changed files with 13 additions and 1 deletions

View file

@ -726,7 +726,14 @@ public class JarFile extends ZipFile
byte[] entryBytes = null;
try
{
entryBytes = readManifestEntry(super.getEntry(entry));
ZipEntry e = super.getEntry(entry);
if (e == null)
{
if (DEBUG)
debug("verifyHashes: no entry '" + entry + "'");
return false;
}
entryBytes = readManifestEntry(e);
}
catch (IOException ioe)
{