ARTEMIS-3304: replace use of deprecated constructors marked as for-removal since Java 16
This commit is contained in:
parent
0094fc9f05
commit
c45b87d6ed
|
@ -179,9 +179,9 @@ public abstract class ArithmeticExpression extends BinaryExpression {
|
||||||
String v = (String) value;
|
String v = (String) value;
|
||||||
try {
|
try {
|
||||||
if (v.contains(".")) {
|
if (v.contains(".")) {
|
||||||
return new Double(v);
|
return Double.valueOf(v);
|
||||||
} else {
|
} else {
|
||||||
return new Long(v);
|
return Long.valueOf(v);
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
throw new RuntimeException("Cannot convert value: " + value + " into a number");
|
throw new RuntimeException("Cannot convert value: " + value + " into a number");
|
||||||
|
|
|
@ -114,7 +114,7 @@ public abstract class ComparisonExpression extends BinaryExpression implements B
|
||||||
regexp.append(".*?"); // Do a non-greedy match
|
regexp.append(".*?"); // Do a non-greedy match
|
||||||
} else if (c == '_') {
|
} else if (c == '_') {
|
||||||
regexp.append("."); // match one
|
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("\\x");
|
||||||
regexp.append(Integer.toHexString(0xFFFF & c));
|
regexp.append(Integer.toHexString(0xFFFF & c));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class ConstantExpression implements Expression {
|
||||||
|
|
||||||
Number value;
|
Number value;
|
||||||
try {
|
try {
|
||||||
value = new Long(text);
|
value = Long.valueOf(text);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
// The number may be too big to fit in a long.
|
// The number may be too big to fit in a long.
|
||||||
value = new BigDecimal(text);
|
value = new BigDecimal(text);
|
||||||
|
@ -89,7 +89,7 @@ public class ConstantExpression implements Expression {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ConstantExpression createFloat(String text) {
|
public static ConstantExpression createFloat(String text) {
|
||||||
Number value = new Double(text);
|
Number value = Double.valueOf(text);
|
||||||
return new ConstantExpression(value);
|
return new ConstantExpression(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue