In JarAnalyzer.java, the constructor opens a JarFile and then sorts entries:
List<JarEntry> entries = Collections.list(jarFile.entries());
entries.sort(Comparator.comparing(ZipEntry::getName)); // NPE if entry has null name
If any JarEntry has a null name (possible in malformed ZIPs), Comparator.comparing throws NPE before the getManifest() try/catch block is reached. The JarFile handle is never closed, causing a resource leak.
Fix: Either validate entry names before sorting, or use a null-safe comparator:
entries.sort(Comparator.comparing(ZipEntry::getName, Comparator.nullsLast(Comparator.naturalOrder())));
In
JarAnalyzer.java, the constructor opens aJarFileand then sorts entries:If any
JarEntryhas anullname (possible in malformed ZIPs),Comparator.comparingthrows NPE before thegetManifest()try/catch block is reached. TheJarFilehandle is never closed, causing a resource leak.Fix: Either validate entry names before sorting, or use a null-safe comparator: