-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
7.73.0.Final
-
None
-
-
-
NEW
-
NEW
-
---
-
---
SortFunction returns FEEL ERROR while evaluating literal expression 'sort(myList,function(x,y) x < y)': The parameter 'list', in function sort(), raised an exception while sorting by natural order.
The Throwable that is catched in invoke method is java.lang.IllegalArgumentException: Comparison method violates its general contract!
Comparator built in org.kie.dmn.feel.runtime.functions.SortFunction.invoke(ctx,list,function) returns explicitely -1 or 1 but never 0. This violates the Comparable contract as stated here by Oracle for Java 7 and after.