@Override public void check(Certificate cert,Collection<String> unresCritExts) throws CertPathValidatorException {
  X509Certificate currCert=(X509Certificate)cert;
  i++;
  checkBasicConstraints(currCert);
  verifyNameConstraints(currCert);
  if (unresCritExts != null && !unresCritExts.isEmpty()) {
    unresCritExts.remove(BasicConstraints_Id.toString());
    unresCritExts.remove(NameConstraints_Id.toString());
  }
}

@ Override public void check ( Certificate cert , Collection < String > unresCritExts ) throws CertPathValidatorException { X509Certificate currCert = ( X509Certificate ) cert ; i ++ ; checkBasicConstraints ( currCert ) ; verifyNameConstraints ( currCert ) ; if ( unresCritExts != null && ! unresCritExts . isEmpty ( ) ) { unresCritExts . remove ( BasicConstraints_Id . toString ( ) ) ; unresCritExts . remove ( NameConstraints_Id . toString ( ) ) ; } }
performs the basic constraints and name constraints checks on the certificate using its internal state .
