ARTEMIS-3304: replace use of deprecated constructors marked as for-removal since Java 16
This commit is contained in:
parent
0094fc9f05
commit
c45b87d6ed
artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter
|
@ -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");
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue