ARTEMIS-3304: replace use of deprecated constructors marked as for-removal since Java 16

This commit is contained in:
Robbie Gemmell 2021-05-17 15:27:28 +01:00
parent 0094fc9f05
commit c45b87d6ed
3 changed files with 5 additions and 5 deletions

View File

@ -179,9 +179,9 @@ public abstract class ArithmeticExpression extends BinaryExpression {
String v = (String) value;
try {
if (v.contains(".")) {
return new Double(v);
return Double.valueOf(v);
} else {
return new Long(v);
return Long.valueOf(v);
}
} catch (NumberFormatException e) {
throw new RuntimeException("Cannot convert value: " + value + " into a number");

View File

@ -114,7 +114,7 @@ public abstract class ComparisonExpression extends BinaryExpression implements B
regexp.append(".*?"); // Do a non-greedy match
} else if (c == '_') {
regexp.append("."); // match one
} else if (REGEXP_CONTROL_CHARS.contains(new Character(c))) {
} else if (REGEXP_CONTROL_CHARS.contains(Character.valueOf(c))) {
regexp.append("\\x");
regexp.append(Integer.toHexString(0xFFFF & c));
} else {

View File

@ -57,7 +57,7 @@ public class ConstantExpression implements Expression {
Number value;
try {
value = new Long(text);
value = Long.valueOf(text);
} catch (NumberFormatException e) {
// The number may be too big to fit in a long.
value = new BigDecimal(text);
@ -89,7 +89,7 @@ public class ConstantExpression implements Expression {
}
public static ConstantExpression createFloat(String text) {
Number value = new Double(text);
Number value = Double.valueOf(text);
return new ConstantExpression(value);
}