Skip to content

Commit 4919620

Browse files
committed
Improved the "compare result changed" error message to include the most
likely cause of the error.
1 parent 1315af8 commit 4919620

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

jme3-core/src/main/java/com/jme3/util/ListSort.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -698,9 +698,11 @@ private void mergeLow(int idxA, int lenA, int idxB, int lenB) {
698698
System.arraycopy(arr, iterB, arr, dest, lengthB);
699699
// The last element of run A belongs at the end of the merge.
700700
arr[dest + lengthB] = tempArray[iterA];
701-
} else if(lengthA== 0){
701+
} else if(lengthA == 0){
702702
throw new UnsupportedOperationException("Compare function result changed! " +
703-
"Make sure you do not modify the scene from another thread!");
703+
"Make sure you do not modify the scene from"
704+
+ " another thread and that the comparisons are not based"
705+
+ " on NaN values.");
704706
} else {//Fail label
705707
System.arraycopy(tempArray, iterA, arr, dest, lengthA);
706708
}

0 commit comments

Comments
 (0)