RFR: 8296734: JarVerifier:: mapSignersToCodeSource should cache in map

Sean Mullan mullan at openjdk.org
Thu Nov 17 19:54:17 UTC 2022


On Wed, 16 Nov 2022 07:41:45 GMT, pandaapo <duke at openjdk.org> wrote:

> Because `JarVerifier#setEagerValidation` will be removed, the field `eagerValidation` will always be false.
> 
> There are some codes using this field: https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/util/jar/JarVerifier.java#L361-L381 Can I remove the `eagerValidation` condition from `if(eagerValidation && sigFileSigners.get(name) != null)`?

You can remove the whole if block since `eagerValidation` will never be true, and this block was only performed if it was true.

> 
> If I can, can I remove this field from `JarVerifier` then?

Yes.

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

PR: https://git.openjdk.org/jdk/pull/11072



More information about the security-dev mailing list