code: static int mergePolicyMapping(int policyMapping, X509CertImpl currCert)
          throws CertPathValidatorException
      {
          if ((policyMapping > 0) && !X509CertImpl.isSelfIssued(currCert)) {
              policyMapping--;
          }
  
          try {
              PolicyConstraintsExtension polConstExt
                  = currCert.getPolicyConstraintsExtension();
              if (polConstExt == null)
                  return policyMapping;
  
              int inhibit =
                  polConstExt.get(PolicyConstraintsExtension.INHIBIT).intValue();
              if (debug != null)
                  debug.println("PolicyChecker.mergePolicyMapping() "
                      + "inhibit Index from cert = " + inhibit);
  
              if (inhibit != -1) {
                  if ((policyMapping == -1) || (inhibit < policyMapping)) {
                      policyMapping = inhibit;
                  }
              }
          } catch (IOException e) {
              if (debug != null) {
                  debug.println("PolicyChecker.mergePolicyMapping "
                                + "unexpected exception");
                  e.printStackTrace();
              }
              throw new CertPathValidatorException(e);
          }
  
          return policyMapping;
      }
docs: Merges the specified policyMapping value with the
  inhibitPolicyMapping field of the <code>PolicyConstraints</code>
  extension obtained from the certificate. A policyMapping
  value of -1 implies no constraint.
  
  @param policyMapping an integer which indicates if policy mapping
  is inhibited
  @param currCert the Certificate to be processed
  @return returns the new policyMapping value
  @exception CertPathValidatorException Exception thrown if an error
  occurs