public void addCertificateChain(List<BurpCertificate> burpCertificateChain){
  Collections.reverse(burpCertificateChain);
  DefaultMutableTreeNode currentNode=null;
  DefaultMutableTreeNode previousNode=null;
  for (  BurpCertificate c : burpCertificateChain) {
    currentNode=new DefaultMutableTreeNode(c);
    if (previousNode == null) {
      rootNode.add(currentNode);
    }
 else {
      previousNode.add(currentNode);
    }
    previousNode=currentNode;
  }
}

public void addCertificateChain ( List < BurpCertificate > burpCertificateChain ) { Collections . reverse ( burpCertificateChain ) ; DefaultMutableTreeNode currentNode = null ; DefaultMutableTreeNode previousNode = null ; for ( BurpCertificate c : burpCertificateChain ) { currentNode = new DefaultMutableTreeNode ( c ) ; if ( previousNode == null ) { rootNode . add ( currentNode ) ; } else { previousNode . add ( currentNode ) ; } previousNode = currentNode ; } }
adds a complete certificate chain to the store . the top certificate of the chain is directly under the root node .
