Skip to content

Commit b129d50

Browse files
committed
null Wrapper is always at the end
1 parent 76bb696 commit b129d50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

visualvm/heapviewer/src/com/sun/tools/visualvm/heapviewer/utils/SortedObjectsBuffer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ private class WrapperComparator implements Comparator<Wrapper<T>> {
171171
@Override
172172
public int compare(Wrapper<T> o1, Wrapper<T> o2) {
173173
if (o1 == o2) return 0;
174-
if (o1 == null) return ascending ? -1 : 1;
175-
if (o2 == null) return ascending ? 1 : -1;
174+
if (o1 == null) return 1;
175+
if (o2 == null) return -1;
176176
int comp = SortedObjectsBuffer.this.compare(o1.value, o2.value);
177177
if (comp == 0) {
178178
if (o1.serialId > o2.serialId) return 1;

0 commit comments

Comments
 (0)