code: public static CertPathValidator getInstance(String algorithm)
              throws NoSuchAlgorithmException {
          Instance instance = GetInstance.getInstance("CertPathValidator",
              CertPathValidatorSpi.class, algorithm);
          return new CertPathValidator((CertPathValidatorSpi)instance.impl,
              instance.provider, algorithm);
      }
docs: Returns a {@code CertPathValidator} object that implements the
  specified algorithm.
  
  <p> This method traverses the list of registered security Providers,
  starting with the most preferred Provider.
  A new CertPathValidator object encapsulating the
  CertPathValidatorSpi implementation from the first
  Provider that supports the specified algorithm is returned.
  
  <p> Note that the list of registered providers may be retrieved via
  the {@link Security#getProviders() Security.getProviders()} method.
  
  @param algorithm the name of the requested {@code CertPathValidator}
  algorithm. See the CertPathValidator section in the <a href=
  "{@docRoot}openjdk-redirect.html?v=8&path=/technotes/guides/security/StandardNames.html#CertPathValidator">
  Java Cryptography Architecture Standard Algorithm Name Documentation</a>
  for information about standard algorithm names.
  
  @return a {@code CertPathValidator} object that implements the
  specified algorithm.
  
  @exception NoSuchAlgorithmException if no Provider supports a
  CertPathValidatorSpi implementation for the
  specified algorithm.
  
  @see java.security.Provider