Skip to content

Commit 4e52f37

Browse files
[refactor] Made SonarCloud recommended changes.
1 parent 0ff76a0 commit 4e52f37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

exist-core/src/main/java/org/exist/xquery/value/DoubleValue.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public AtomicValue convertTo(final int requiredType) throws XPathException {
224224
if (requiredType != Type.INTEGER && value > Integer.MAX_VALUE) {
225225
throw new XPathException(getExpression(), ErrorCodes.FOCA0003, "Value is out of range for type " + Type.getTypeName(requiredType));
226226
}
227-
return new IntegerValue(getExpression(), new Double(value).longValue(), requiredType);
227+
return new IntegerValue(getExpression(), (long) value, requiredType);
228228
case Type.BOOLEAN:
229229
return new BooleanValue(getExpression(), this.effectiveBooleanValue());
230230
default:

0 commit comments

Comments
 (0)