File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
exist-core/src/main/java/org/exist/xquery/value Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -146,19 +146,19 @@ public boolean isPositive() {
146
146
147
147
@ Override
148
148
protected @ Nullable IntSupplier createComparisonWith (final NumericValue other ) {
149
- final IntSupplier comparison ;
150
149
if (other instanceof IntegerValue ) {
151
- comparison = () -> BigDecimal .valueOf (value ).compareTo (new BigDecimal (((IntegerValue ) other ).value ));
152
- } else if (other instanceof DecimalValue ) {
153
- comparison = () -> BigDecimal .valueOf (value ).compareTo (((DecimalValue ) other ).value );
154
- } else if (other instanceof DoubleValue ) {
155
- comparison = () -> Double .compare (value , ((DoubleValue ) other ).value );
156
- } else if (other instanceof FloatValue ) {
157
- comparison = () -> Double .compare (value , ((FloatValue ) other ).value );
158
- } else {
159
- return null ;
160
- }
161
- return comparison ;
150
+ return () -> BigDecimal .valueOf (value ).compareTo (new BigDecimal (((IntegerValue ) other ).value ));
151
+ }
152
+ if (other instanceof DecimalValue ) {
153
+ return () -> BigDecimal .valueOf (value ).compareTo (((DecimalValue ) other ).value );
154
+ }
155
+ if (other instanceof DoubleValue ) {
156
+ return () -> Double .compare (value , ((DoubleValue ) other ).value );
157
+ }
158
+ if (other instanceof FloatValue ) {
159
+ return () -> Double .compare (value , ((FloatValue ) other ).value );
160
+ }
161
+ return null ;
162
162
}
163
163
164
164
@ Override
You can’t perform that action at this time.
0 commit comments