RFR: 8357682 : sun.security.provider.certpath.Builder#getMatchingPolicies always returns null

Sean Mullan mullan at openjdk.org
Wed Jul 23 13:36:03 UTC 2025


On Mon, 21 Jul 2025 22:33:40 GMT, Koushik Muthukrishnan Thirupattur <duke at openjdk.org> wrote:

> The method sun.security.provider.certpath.Builder#getMatchingPolicies appears to have been intended as a lazy initialization of the matchingPolicies field of the Builder class. However it checks for "matchingPolicies != null" (presumably it should be "matchingPolicies == null") at the start, which is always false. Therefore the method always returns null and the intended optimization goes unused.

src/java.base/share/classes/sun/security/provider/certpath/Builder.java line 1:

> 1: /*

Update copyright date.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26418#discussion_r2225635986


More information about the security-dev mailing list