- changed status to resolved
BAT crashes when loading empty (0-byte) .jar files
BAT currently uses java.util.zip.ZipFile(java.io.File) to load .jar files. This will throw a ZipException if the .jar file is empty (0 bytes) or broken, causing the class file loading process to abort completely, because the exception is not handled in BAT.
We have found that the Qualitas Corpus contains several empty 0-byte .jar files (for unknown purposes; perhaps even just packaging/unpackaging errors). Since BAT crashes when encountering them, it becomes impossible to use BAT to search a directory for .jar files if it also contains broken ones.
It would be nicer if BAT could show an error message if a specific .jar could not be loaded, and continue with others in any case. Similar behaviour already exists for class files: Problems when loading individual class files are reported on the console but don't abort the loading process.
Comments (3)
-
repo owner -
repo owner - changed component to Bytecode Toolkit
-
repo owner - changed component to Bytecode Representation
- Log in to comment
fixed issue
#20It is now possible to always specify an exception handler; this makes it possible to continue reading jar files/folders even if a specific file cannot be read.
Signed-off-by: Michael Eichberg mail@michael-eichberg.de
→ <<cset 2c6ee06b8341>>