bmscomp commented on code in PR #13662:
URL: https://github.com/apache/kafka/pull/13662#discussion_r1428518449
##########
connect/json/src/main/java/org/apache/kafka/connect/json/JsonConverter.java:
##########
@@ -143,7 +143,7 @@ public class JsonConverter implements Converter,
HeaderConverter, Versioned {
// names specified in the field
private static final HashMap<String, LogicalTypeConverter>
LOGICAL_CONVERTERS = new HashMap<>();
- private static final JsonNodeFactory JSON_NODE_FACTORY =
JsonNodeFactory.withExactBigDecimals(true);
+ private static final JsonNodeFactory JSON_NODE_FACTORY = new
JsonNodeFactory(true);
Review Comment:
@mimaison Sorry I missed answering this point, the change is made because
the static method is deprecated
```
@Deprecated
public static JsonNodeFactory withExactBigDecimals(boolean
bigDecimalExact) {
return new JsonNodeFactory(bigDecimalExact);
}
```
and the best available replacement for it is the the constructor
```
/**
* Return a factory instance with the desired behavior for BigDecimals
* <p>See {@link #JsonNodeFactory(boolean)} for a full description.</p>
*
* @param bigDecimalExact If {code true} DISABLE normalization of {@link
BigDecimal} values;
* if {code false} ENABLE normalization
* @return a factory instance with specified configuration
*
* @deprecated Use {@link
com.fasterxml.jackson.databind.cfg.JsonNodeFeature#STRIP_TRAILING_BIGDECIMAL_ZEROES}
* instead for configuring behavior.
*/
@Deprecated
public static JsonNodeFactory withExactBigDecimals(boolean
bigDecimalExact)
{
return new JsonNodeFactory(bigDecimalExact);
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]