From ed817507d421a1813ca022725661b1ed8db2df5a Mon Sep 17 00:00:00 2001 From: Paul Speed Date: Sun, 20 Nov 2016 07:14:49 -0500 Subject: [PATCH] Improved the "compare result changed" error message to include the most likely cause of the error. --- jme3-core/src/main/java/com/jme3/util/ListSort.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/util/ListSort.java b/jme3-core/src/main/java/com/jme3/util/ListSort.java index 8f61961ad..b88235f37 100644 --- a/jme3-core/src/main/java/com/jme3/util/ListSort.java +++ b/jme3-core/src/main/java/com/jme3/util/ListSort.java @@ -698,9 +698,11 @@ public class ListSort { System.arraycopy(arr, iterB, arr, dest, lengthB); // The last element of run A belongs at the end of the merge. arr[dest + lengthB] = tempArray[iterA]; - } else if(lengthA== 0){ + } else if(lengthA == 0){ throw new UnsupportedOperationException("Compare function result changed! " + - "Make sure you do not modify the scene from another thread!"); + "Make sure you do not modify the scene from" + + " another thread and that the comparisons are not based" + + " on NaN values."); } else {//Fail label System.arraycopy(tempArray, iterA, arr, dest, lengthA); }