File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
exist-core/src/main/java/org/exist/xquery/value Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -66,15 +66,16 @@ public ItemComparator(@Nullable final Collator collator) {
66
66
}
67
67
68
68
@ Override
69
- public int compare (final Item left , final Item right ) {
70
- return switch (left ) {
71
- case AtomicValue atomicValue when right instanceof AtomicValue -> {
69
+ public int compare (final Item n1 , final Item n2 ) {
70
+ return switch (n1 ) {
71
+ case NodeImpl node when (!(n2 instanceof org .exist .dom .memtree .NodeImpl )) -> Constants .INFERIOR ;
72
+ case AtomicValue atomicValue when n2 instanceof AtomicValue -> {
72
73
if (atomicValueComparator == null ) {
73
74
atomicValueComparator = new AtomicValueComparator (collator );
74
75
}
75
- yield atomicValueComparator .compare (atomicValue , (AtomicValue ) right );
76
+ yield atomicValueComparator .compare (atomicValue , (AtomicValue ) n2 );
76
77
}
77
- case Comparable comparable -> comparable .compareTo (right );
78
+ case Comparable comparable -> comparable .compareTo (n2 );
78
79
case null , default -> Constants .INFERIOR ;
79
80
};
80
81
}
You can’t perform that action at this time.
0 commit comments