[jdk11u-dev] RFR: 8309841: Jarsigner should print a warning if an entry is removed [v2]

Andrew John Hughes andrew at openjdk.org
Thu Mar 20 01:55:12 UTC 2025


On Mon, 10 Mar 2025 08:25:53 GMT, Roman Marchenko <rmarchenko at openjdk.org> wrote:

>> src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java line 1296:
>> 
>>> 1294:                 }
>>> 1295:             }
>>> 1296:             if (hasNonexistentEntries) {
>> 
>> I think we should check hasNonexistentEntries at line 1259 also. This is a difference between JDK17 and JDK11 versions
>
> Added the check. Although the checks at the line 1255 look excessive.

Agreed. This is fixed by the refactoring in [JDK-8250586](https://bugs.openjdk.org/browse/JDK-8250586) in OpenJDK 16 and later, but in 11u, `hasNonexistentEntries` needs to be checked twice. The one here is nested inside the other, so if you don't add `hasNonexistentEntries` to the big or conditional, it may not fire unless there is some other warning.

-------------

PR Review Comment: https://git.openjdk.org/jdk11u-dev/pull/3007#discussion_r2004650562


More information about the jdk-updates-dev mailing list