fix ClassCastException in ZipFile.getInputStream

This was being thrown when the parameter passed was a
JarFile.MyJarEntry, not a ZipFile.MyZipEntry, yet we cast it to the
latter.
This commit is contained in:
Joel Dice
2011-05-16 10:30:56 -06:00
parent fa7d46c322
commit 18a6393ecf
2 changed files with 15 additions and 3 deletions

View File

@ -33,7 +33,7 @@ public class JarFile extends ZipFile {
return (JarEntry) getEntry(JarEntryFactory.Instance, name);
}
private static class MyJarEntry extends JarEntry {
private static class MyJarEntry extends JarEntry implements MyEntry {
public final Window window;
public final int pointer;
@ -65,6 +65,10 @@ public class JarFile extends ZipFile {
return 0;
}
}
public int pointer() {
return pointer;
}
}
private static class JarEntryFactory implements EntryFactory {