Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8357682

sun.security.provider.certpath.Builder#getMatchingPolicies always returns null

XMLWordPrintable

    • 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.


            kthirupattur Koushik Muthukrishnan Thirupattur
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: