From cc9b22de4c8202a71721ee9d5aa61a68a4af2368 Mon Sep 17 00:00:00 2001 From: shadowislord Date: Sun, 7 Sep 2014 15:46:27 -0400 Subject: [PATCH] Change the compare function error in ListSort to be more user friendly and indicate the likely cause of the error. --- jme3-core/src/main/java/com/jme3/util/ListSort.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 002458b36..db16ef10c 100644 --- a/jme3-core/src/main/java/com/jme3/util/ListSort.java +++ b/jme3-core/src/main/java/com/jme3/util/ListSort.java @@ -850,7 +850,8 @@ public class ListSort { // 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); }