On Fri, 21 Mar 2025 19:23:59 GMT, Hai-May Chao <hc...@openjdk.org> wrote:
>> The jarsigner -verify command currently performs verification by reading >> from JarFile to navigate the central directory (CEN) headers. It is now >> enhanced to include cross-validation of entries between JarFile (CEN-based) >> and JarInputStream (stream-based) representations of the JAR. It emits >> earnings when detecting discrepancies between a JAR file’s central directory >> and its local file entries. > > Hai-May Chao has updated the pull request incrementally with one additional > commit since the last revision: > > Update test with more ZipEntry in the jar src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java line 1163: > 1161: > 1162: readEntry(jis); > 1163: try (InputStream cenInputStream = > jarFile.getInputStream(cenEntry)) { What if this returns null? Shouldn't you also emit a warning that the entry was read by JarInputStream but not JarFile? Also, I think `readEntry()` would throw an NPE. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23532#discussion_r2012879500