# HG changeset patch # User Peter Hofer # Date 1309366389 -7200 # Node ID 95e3df7cad3517e999cb5de61a930bc83b12913c # Parent 8073f5ad1d8749bab7b0da92ca63b0fc475032f6 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. diff -r 8073f5ad1d87 -r 95e3df7cad35 src/share/tools/IdealGraphVisualizer/HierarchicalLayout/src/com/sun/hotspot/igv/hierarchicallayout/HierarchicalLayoutManager.java --- 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 nodeProcessingDownComparator = new Comparator() { - 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) {