log.entering(this.getClass().getName(), "orderChain", result);
if (Configuration.DEBUG) log.exiting(this.getClass().getName(), "orderChain", result);
  private LinkedList orderChain(Collection chain)  {    log.entering(this.getClass().getName(), "orderChain"); //$NON-NLS-1$    LinkedList in = new LinkedList(chain);    int initialCount = in.size();    LinkedList result = new LinkedList();    Principal issuer = selfSignedCertificate.getIssuerDN();    ListIterator it;    outer: while (in.size() > 0)      {        for (it = in.listIterator(); it.hasNext();)          {            X509Certificate certificate = (X509Certificate) it.next();            if (issuer.equals(certificate.getSubjectDN()))              {                it.remove();                result.addLast(certificate);                issuer = certificate.getIssuerDN();                continue outer;              }          }        throw new IllegalArgumentException(            Messages.getFormattedString(Messages.getString("ImportCmd.7"), //$NON-NLS-1$                                        new Object[] { Integer.valueOf(result.size()),                                                       Integer.valueOf(initialCount) }));      }    log.entering(this.getClass().getName(), "orderChain", result); //$NON-NLS-1$    return result;  }