Authored by jack.xue

fix sort list

@@ -74,8 +74,6 @@ public class QueueViewJob implements Callable { @@ -74,8 +74,6 @@ public class QueueViewJob implements Callable {
74 try { 74 try {
75 oneView.setQueueView(Arrays.asList(InterVar.JSONMAPPER.readValue(respJson, QueueInfo[].class))); 75 oneView.setQueueView(Arrays.asList(InterVar.JSONMAPPER.readValue(respJson, QueueInfo[].class)));
76 76
77 - System.setProperty("java.util.Arrays.useLegacyMergeSort", "true");  
78 -  
79 sortQueue(oneView.getQueueView()); 77 sortQueue(oneView.getQueueView());
80 78
81 oneView.setMoId(moInfo.getMoId()); 79 oneView.setMoId(moInfo.getMoId());
@@ -184,7 +182,15 @@ public class QueueViewJob implements Callable { @@ -184,7 +182,15 @@ public class QueueViewJob implements Callable {
184 @Override 182 @Override
185 public int compare(QueueInfo o1, QueueInfo o2) { 183 public int compare(QueueInfo o1, QueueInfo o2) {
186 184
187 - return o1.getMessages() > o2.getMessages() ? -1 : 1; 185 + if (o1.getMessages() > o2.getMessages()) {
  186 + return -1;
  187 + } else {
  188 + if (o1.getMessages() < o2.getMessages()) {
  189 + return 1;
  190 + } else {
  191 + return 0;
  192 + }
  193 + }
188 } 194 }
189 }); 195 });
190 } 196 }