Authored by jack.xue

fix sort list

... ... @@ -74,8 +74,6 @@ public class QueueViewJob implements Callable {
try {
oneView.setQueueView(Arrays.asList(InterVar.JSONMAPPER.readValue(respJson, QueueInfo[].class)));
System.setProperty("java.util.Arrays.useLegacyMergeSort", "true");
sortQueue(oneView.getQueueView());
oneView.setMoId(moInfo.getMoId());
... ... @@ -184,7 +182,15 @@ public class QueueViewJob implements Callable {
@Override
public int compare(QueueInfo o1, QueueInfo o2) {
return o1.getMessages() > o2.getMessages() ? -1 : 1;
if (o1.getMessages() > o2.getMessages()) {
return -1;
} else {
if (o1.getMessages() < o2.getMessages()) {
return 1;
} else {
return 0;
}
}
}
});
}
... ...