File tree Expand file tree Collapse file tree 2 files changed +13
-13
lines changed
exist-core/src/main/java/org/exist/xquery Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -105,12 +105,12 @@ private boolean hasPreviousOrderByDescending() {
105
105
FLWORClause prev = getPreviousClause ();
106
106
while (prev != null ) {
107
107
switch (prev .getType ()) {
108
- case LET :
109
- case GROUPBY :
110
- case FOR :
108
+ case LET , GROUPBY , FOR -> {
111
109
return false ;
112
- case ORDERBY :
113
- return isDescending (((OrderByClause ) prev ).getOrderSpecs ());
110
+ }
111
+ case ORDERBY -> {
112
+ return isDescending (((OrderByClause ) prev ).getOrderSpecs ());
113
+ }
114
114
}
115
115
prev = prev .getPreviousClause ();
116
116
}
Original file line number Diff line number Diff line change @@ -153,14 +153,14 @@ public boolean isPositive() {
153
153
comparison = () -> Constants .SUPERIOR ;
154
154
} else if (isInfinite () && other .isInfinite () && isPositive () == other .isPositive ()) {
155
155
comparison = () -> Constants .EQUAL ;
156
- } else if (other instanceof IntegerValue ) {
157
- comparison = () -> BigDecimal .valueOf (value ).compareTo (new BigDecimal ((( IntegerValue ) other ) .value ));
158
- } else if (other instanceof DecimalValue ) {
159
- comparison = () -> BigDecimal .valueOf (value ).compareTo ((( DecimalValue ) other ) .value );
160
- } else if (other instanceof DoubleValue ) {
161
- comparison = () -> Double .compare (value , (( DoubleValue ) other ) .value );
162
- } else if (other instanceof FloatValue ) {
163
- comparison = () -> Double .compare (value , (( FloatValue ) other ) .value );
156
+ } else if (other instanceof IntegerValue iv ) {
157
+ comparison = () -> BigDecimal .valueOf (value ).compareTo (new BigDecimal (iv .value ));
158
+ } else if (other instanceof DecimalValue dv ) {
159
+ comparison = () -> BigDecimal .valueOf (value ).compareTo (dv .value );
160
+ } else if (other instanceof DoubleValue dv ) {
161
+ comparison = () -> Double .compare (value , dv .value );
162
+ } else if (other instanceof FloatValue fv ) {
163
+ comparison = () -> Double .compare (value , fv .value );
164
164
} else {
165
165
comparison = null ;
166
166
}
You can’t perform that action at this time.
0 commit comments