Skip to content

Commit bc5fde8

Browse files
committed
try using STRING.convert in place of toString in INTEGER and LONG convert
1 parent d6072d8 commit bc5fde8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/ConvertProcessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ enum Type {
3434
@Override
3535
public Object convert(Object value) {
3636
try {
37-
String strValue = value.toString();
37+
String strValue = STRING.convert(value);
3838
if (strValue.startsWith("0x") || strValue.startsWith("-0x")) {
3939
return Integer.decode(strValue);
4040
}
@@ -49,7 +49,7 @@ public Object convert(Object value) {
4949
@Override
5050
public Object convert(Object value) {
5151
try {
52-
String strValue = value.toString();
52+
String strValue = STRING.convert(value);
5353
if (strValue.startsWith("0x") || strValue.startsWith("-0x")) {
5454
return Long.decode(strValue);
5555
}

0 commit comments

Comments
 (0)