Skip to content

Commit ad6e60a

Browse files
committed
fix to reversed sub-node order for block size iterator
1 parent 99f6077 commit ad6e60a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

IPAddress/src/inet.ipaddr/inet/ipaddr/format/util/BinaryTreeNode.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,7 +1378,7 @@ public int compare(BinaryTreeNode<E> node1, BinaryTreeNode<E> node2) {
13781378
this.addedOnly = addedOnly;
13791379
this.bounds = bounds;
13801380
Comparator<BinaryTreeNode<E>> comp =
1381-
(Comparator<BinaryTreeNode<E>>) (reverseBlocksEqualSize ? COMP : REVERSE_COMP);
1381+
(Comparator<BinaryTreeNode<E>>) (reverseBlocksEqualSize ? REVERSE_COMP : COMP);
13821382
if(treeSize > 0) {
13831383
int initialCapacity = treeSize >> 1;
13841384
if(initialCapacity == 0) {
@@ -1478,7 +1478,7 @@ static class Cached<E, C> {
14781478

14791479
private static final Comparator<?> COMP = new Comp<>(false), REVERSE_COMP = new Comp<>(true);
14801480

1481-
// heap will have either a caching objectwith the node or just the node
1481+
// heap will have the caching object with the node
14821482
private PriorityQueue<Cached<E, C>> queue;
14831483

14841484
private C cacheItem;
@@ -1493,7 +1493,7 @@ static class Cached<E, C> {
14931493
ChangeTracker changeTracker) {
14941494
super(start, null, changeTracker);
14951495
@SuppressWarnings("unchecked")
1496-
Comparator<Cached<E, C>> comp = (Comparator<Cached<E, C>>) (reverseBlocksEqualSize ? COMP : REVERSE_COMP);
1496+
Comparator<Cached<E, C>> comp = (Comparator<Cached<E, C>>) (reverseBlocksEqualSize ? REVERSE_COMP : COMP);
14971497
if(treeSize == 0) {
14981498
queue = new PriorityQueue<>(comp);
14991499
} else {

0 commit comments

Comments
 (0)