This was being thrown when the parameter passed was a JarFile.MyJarEntry, not a ZipFile.MyZipEntry, yet we cast it to the latter.