Skip to content

Commit 109a10d

Browse files
committed
Unsigned long also needs to handle unicode numbers
1 parent 4fd68f8 commit 109a10d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/framework/src/main/java/org/elasticsearch/datageneration/matchers/source/FieldSpecificMatcher.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,9 +327,15 @@ Object convert(Object value, Object nullValue) {
327327
yield nullValueBigInt;
328328
}
329329

330-
yield s;
330+
try {
331+
yield new BigInteger(s);
332+
} catch (NumberFormatException e) {
333+
// malformed
334+
yield value;
335+
}
331336
}
332337
case Long l -> BigInteger.valueOf(l);
338+
case Integer i -> BigInteger.valueOf(i);
333339
default -> value;
334340
};
335341

0 commit comments

Comments
 (0)