소스 검색

Change the compare function error in ListSort to be more user friendly and indicate the likely cause of the error.

shadowislord 11 년 전
부모
커밋
cc9b22de4c
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      jme3-core/src/main/java/com/jme3/util/ListSort.java

+ 2 - 1
jme3-core/src/main/java/com/jme3/util/ListSort.java

@@ -850,7 +850,8 @@ public class ListSort<T> {
             // The first element of run B belongs at the front of the merge. 
             arr[dest] = tempArray[iterB];  
         } else if (lengthB == 0) {
-              throw new UnsupportedOperationException("Inconsistant comparison function");
+              throw new UnsupportedOperationException("Compare function result changed! " +
+                                                      "Make sure you do not modify the scene from another thread!");
         } else {//Fail label                        
             System.arraycopy(tempArray, 0, arr, dest - (lengthB - 1), lengthB);
         }