private boolean replacePrincipals(List<PolicyParser.PrincipalEntry> principals,KeyStore keystore){
  if (principals == null || principals.isEmpty() || keystore == null)   return true;
  for (  PolicyParser.PrincipalEntry pppe : principals) {
    if (pppe.isReplaceName()) {
      String name;
      if ((name=getDN(pppe.principalName,keystore)) == null) {
        return false;
      }
      if (debug != null) {
        debug.println("  Replacing \"" + pppe.principalName + "\" with "+ X500PRINCIPAL+ "/\""+ name+ "\"");
      }
      pppe.principalClass=X500PRINCIPAL;
      pppe.principalName=name;
    }
  }
  return true;
}

private boolean replacePrincipals ( List < PolicyParser . PrincipalEntry > principals , KeyStore keystore ) { if ( principals == null || principals . isEmpty ( ) || keystore == null ) return true ; for ( PolicyParser . PrincipalEntry pppe : principals ) { if ( pppe . isReplaceName ( ) ) { String name ; if ( ( name = getDN ( pppe . principalName , keystore ) ) == null ) { return false ; } if ( debug != null ) { debug . println ( "  Replacing \"" + pppe . principalName + "\" with " + X500PRINCIPAL + "/\"" + name + "\"" ) ; } pppe . principalClass = X500PRINCIPAL ; pppe . principalName = name ; } } return true ; }
return true if no replacement was performed , or if replacement succeeded .
