code: public static Collection<X509CRL> getCRLs(X509CRLSelector selector,
                                                boolean signFlag,
                                                PublicKey prevKey,
                                                X509Certificate prevCert,
                                                String provider,
                                                List<CertStore> certStores,
                                                boolean[] reasonsMask,
                                                Set<TrustAnchor> trustAnchors,
                                                Date validity)
          throws CertStoreException
      {
          X509Certificate cert = selector.getCertificateChecking();
          if (cert == null) {
              return Collections.emptySet();
          }
          try {
              X509CertImpl certImpl = X509CertImpl.toImpl(cert);
              if (debug != null) {
                  debug.println("DistributionPointFetcher.getCRLs: Checking "
                          + "CRLDPs for " + certImpl.getSubjectX500Principal());
              }
              CRLDistributionPointsExtension ext =
                  certImpl.getCRLDistributionPointsExtension();
              if (ext == null) {
                  if (debug != null) {
                      debug.println("No CRLDP ext");
                  }
                  return Collections.emptySet();
              }
              List<DistributionPoint> points =
                      ext.get(CRLDistributionPointsExtension.POINTS);
              Set<X509CRL> results = new HashSet<>();
              for (Iterator<DistributionPoint> t = points.iterator();
                   t.hasNext() && !Arrays.equals(reasonsMask, ALL_REASONS); ) {
                  DistributionPoint point = t.next();
                  Collection<X509CRL> crls = getCRLs(selector, certImpl,
                      point, reasonsMask, signFlag, prevKey, prevCert, provider,
                      certStores, trustAnchors, validity);
                  results.addAll(crls);
              }
              if (debug != null) {
                  debug.println("Returning " + results.size() + " CRLs");
              }
              return results;
          } catch (CertificateException | IOException e) {
              return Collections.emptySet();
          }
      }
docs: Return the X509CRLs matching this selector. The selector must be
  an X509CRLSelector with certificateChecking set.