Mercurial > hg > truffle
changeset 3097:95e3df7cad35
IdealGraphVisualizer: Consider two nodes to be equal when node.vertex is null for both of them in nodeProcessingDownComparator and nodeProcessingUpComparator. This should fix transitivity issues when sorting.
author | Peter Hofer <peter.hofer@jku.at> |
---|---|
date | Wed, 29 Jun 2011 18:53:09 +0200 |
parents | 8073f5ad1d87 |
children | 28484c5f00d7 |
files | src/share/tools/IdealGraphVisualizer/HierarchicalLayout/src/com/sun/hotspot/igv/hierarchicallayout/HierarchicalLayoutManager.java |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/tools/IdealGraphVisualizer/HierarchicalLayout/src/com/sun/hotspot/igv/hierarchicallayout/HierarchicalLayoutManager.java Wed Jun 29 18:27:14 2011 +0200 +++ b/src/share/tools/IdealGraphVisualizer/HierarchicalLayout/src/com/sun/hotspot/igv/hierarchicallayout/HierarchicalLayoutManager.java Wed Jun 29 18:53:09 2011 +0200 @@ -530,9 +530,11 @@ } }; private static final Comparator<LayoutNode> nodeProcessingDownComparator = new Comparator<LayoutNode>() { - public int compare(LayoutNode n1, LayoutNode n2) { if (n1.vertex == null) { + if (n2.vertex == null) { + return 0; + } return -1; } if (n2.vertex == null) { @@ -545,6 +547,9 @@ public int compare(LayoutNode n1, LayoutNode n2) { if (n1.vertex == null) { + if (n2.vertex == null) { + return 0; + } return -1; } if (n2.vertex == null) {