-
Bug
-
Resolution: Unresolved
-
P4
-
8, 25
-
Cause Known
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
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.
Note that I have observed the issue in the latest JDK code available to me and also at least as far back as jdk11u-dev.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
This bug was found by code review and can easily be verified from source code alone.
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.
Note that I have observed the issue in the latest JDK code available to me and also at least as far back as jdk11u-dev.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
This bug was found by code review and can easily be verified from source code alone.