Details
-
Bug
-
Status: In Progress
-
Critical
-
Resolution: Unresolved
-
None
-
None
-
None
Description
When JsonConverter is configured with schemas.enable=false and value, exceeding Double is passed, the result is incorrect since the converter trims it to Double:
Map<String, Boolean> props = Collections.singletonMap("schemas.enable", false); converter.configure(props, true); BigInteger value = BigInteger.valueOf(Long.MAX_VALUE).add(new BigInteger("1")); String msg = value.toString(); SchemaAndValue schemaAndValue = converter.toConnectData(TOPIC, msg.getBytes()); assertNull(schemaAndValue.schema()); assertEquals(value, schemaAndValue.value());
Fails with:
expected:<9223372036854775808> but was:<-9223372036854775808> Expected :9223372036854775808 Actual :-9223372036854775808