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

pandaapo duke at openjdk.org
Thu Nov 17 20:32:19 UTC 2022


On Thu, 17 Nov 2022 19:50:32 GMT, Sean Mullan <mullan 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.

OK, then the first param `JarFile jar` of this method will be redundant, I will refactor it and related code.

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

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



More information about the security-dev mailing list