Skip to content

Commit 732c035

Browse files
committed
Fix regression with optimization work (prior commit) where the explorer isn't fully populated
1 parent 34b9748 commit 732c035

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

recaf-ui/src/main/java/software/coley/recaf/ui/control/tree/WorkspaceTreeNode.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,10 @@ private static int binaryUnboxingSearch(@Nonnull List<WorkspaceTreeNode> items,
291291
int last = items.size() - 1;
292292
while (first <= last) {
293293
int middle = (first + last) >>> 1;
294-
int compResult = items.get(middle).getValue().localCompare(target);
294+
PathNode<?> item = items.get(middle).getValue();
295+
int compResult = item.getClass() == target.getClass() ?
296+
item.localCompare(target) :
297+
item.compareTo(target);
295298
if (compResult < 0)
296299
first = middle + 1;
297300
else if (compResult > 0)

0 commit comments

Comments
 (0)