From 0a13615d91eebcf1a68d5e651678c7e60a2a5f2b Mon Sep 17 00:00:00 2001 From: kjvdheide Date: Fri, 15 Dec 2017 16:06:57 +0000 Subject: [PATCH] JAL-1953 node comparing now includes checking node IDs to prevent false duplicate keys in the node hashmaps --- src/jalview/ext/archaeopteryx/TreeNode.java | 5 +++++ src/jalview/ext/treeviewer/ExternalTreeNodeI.java | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/jalview/ext/archaeopteryx/TreeNode.java b/src/jalview/ext/archaeopteryx/TreeNode.java index 914cdd2..1205062 100644 --- a/src/jalview/ext/archaeopteryx/TreeNode.java +++ b/src/jalview/ext/archaeopteryx/TreeNode.java @@ -30,6 +30,7 @@ public class TreeNode implements ExternalTreeNodeI node = aptxNode; originalNodes.put(aptxNode, this); wrappedNodes.put(this, aptxNode); + System.out.println(getId()); } @@ -209,6 +210,10 @@ public class TreeNode implements ExternalTreeNodeI { return false; } + else if (getId() != other.getId()) + { + return false; + } } else if (!node.equals(other.node)) { diff --git a/src/jalview/ext/treeviewer/ExternalTreeNodeI.java b/src/jalview/ext/treeviewer/ExternalTreeNodeI.java index 1481b06..bdf3b8d 100644 --- a/src/jalview/ext/treeviewer/ExternalTreeNodeI.java +++ b/src/jalview/ext/treeviewer/ExternalTreeNodeI.java @@ -7,7 +7,6 @@ import java.util.List; public interface ExternalTreeNodeI { - final static int nodeCount = 0; public String getNodeName(); @@ -31,8 +30,4 @@ public interface ExternalTreeNodeI public boolean isInternal(); - public static int getTotalNodes() - { - return nodeCount; - } } -- 1.7.10.2