diff --git a/LICENSE-binary b/LICENSE-binary index f669a86fed094..db82b0b7b6b8c 100644 --- a/LICENSE-binary +++ b/LICENSE-binary @@ -216,16 +216,16 @@ commons-lang3-3.8.1 commons-logging-1.2 commons-validator-1.7 error_prone_annotations-2.10.0 -jackson-annotations-2.13.5 -jackson-core-2.13.5 -jackson-databind-2.13.5 -jackson-dataformat-csv-2.13.5 -jackson-datatype-jdk8-2.13.5 -jackson-jaxrs-base-2.13.5 -jackson-jaxrs-json-provider-2.13.5 -jackson-module-jaxb-annotations-2.13.5 -jackson-module-scala_2.13-2.13.5 -jackson-module-scala_2.12-2.13.5 +jackson-annotations-2.16.0 +jackson-core-2.16.0 +jackson-databind-2.16.0 +jackson-dataformat-csv-2.16.0 +jackson-datatype-jdk8-2.16.0 +jackson-jaxrs-base-2.16.0 +jackson-jaxrs-json-provider-2.16.0 +jackson-module-jaxb-annotations-2.16.0 +jackson-module-scala_2.13-2.16.0 +jackson-module-scala_2.12-2.16.0 jakarta.validation-api-2.0.2 javassist-3.29.2-GA jetty-client-9.4.53.v20231009 diff --git a/connect/json/src/main/java/org/apache/kafka/connect/json/JsonConverter.java b/connect/json/src/main/java/org/apache/kafka/connect/json/JsonConverter.java index 105a805b49c3f..f9a00ce925772 100644 --- a/connect/json/src/main/java/org/apache/kafka/connect/json/JsonConverter.java +++ b/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 LOGICAL_CONVERTERS = new HashMap<>(); - private static final JsonNodeFactory JSON_NODE_FACTORY = JsonNodeFactory.withExactBigDecimals(true); + private static final JsonNodeFactory JSON_NODE_FACTORY = new JsonNodeFactory(true); static { LOGICAL_CONVERTERS.put(Decimal.LOGICAL_NAME, new LogicalTypeConverter() { diff --git a/connect/json/src/main/java/org/apache/kafka/connect/json/JsonDeserializer.java b/connect/json/src/main/java/org/apache/kafka/connect/json/JsonDeserializer.java index 90f81f1523791..66b9a27263040 100644 --- a/connect/json/src/main/java/org/apache/kafka/connect/json/JsonDeserializer.java +++ b/connect/json/src/main/java/org/apache/kafka/connect/json/JsonDeserializer.java @@ -38,7 +38,7 @@ public class JsonDeserializer implements Deserializer { * Default constructor needed by Kafka */ public JsonDeserializer() { - this(Collections.emptySet(), JsonNodeFactory.withExactBigDecimals(true)); + this(Collections.emptySet(), new JsonNodeFactory(true)); } /** diff --git a/connect/json/src/main/java/org/apache/kafka/connect/json/JsonSerializer.java b/connect/json/src/main/java/org/apache/kafka/connect/json/JsonSerializer.java index a2ef4970a4e7f..cd49d19661986 100644 --- a/connect/json/src/main/java/org/apache/kafka/connect/json/JsonSerializer.java +++ b/connect/json/src/main/java/org/apache/kafka/connect/json/JsonSerializer.java @@ -37,7 +37,7 @@ public class JsonSerializer implements Serializer { * Default constructor needed by Kafka */ public JsonSerializer() { - this(Collections.emptySet(), JsonNodeFactory.withExactBigDecimals(true)); + this(Collections.emptySet(), new JsonNodeFactory(true)); } /** diff --git a/connect/json/src/test/java/org/apache/kafka/connect/json/JsonConverterTest.java b/connect/json/src/test/java/org/apache/kafka/connect/json/JsonConverterTest.java index f6e9341e23162..e6a356e761347 100644 --- a/connect/json/src/test/java/org/apache/kafka/connect/json/JsonConverterTest.java +++ b/connect/json/src/test/java/org/apache/kafka/connect/json/JsonConverterTest.java @@ -49,6 +49,7 @@ import java.util.HashMap; import java.util.HashSet; import java.util.Map; +import java.util.Objects; import java.util.Set; import java.util.TimeZone; @@ -65,7 +66,7 @@ public class JsonConverterTest { private final ObjectMapper objectMapper = new ObjectMapper() .enable(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS) - .setNodeFactory(JsonNodeFactory.withExactBigDecimals(true)); + .setNodeFactory(new JsonNodeFactory(true)); private final JsonConverter converter = new JsonConverter(); @@ -869,7 +870,7 @@ public void testCacheSchemaToJsonConversion() { @Test public void testJsonSchemaCacheSizeFromConfigFile() throws URISyntaxException, IOException { - URL url = getClass().getResource("/connect-test.properties"); + URL url = Objects.requireNonNull(getClass().getResource("/connect-test.properties")); File propFile = new File(url.toURI()); String workerPropsFile = propFile.getAbsolutePath(); Map workerProps = !workerPropsFile.isEmpty() ? diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index c3d3b8444e75e..8445ec062fbcb 100644 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -103,8 +103,7 @@ versions += [ gradle: "8.5", grgit: "4.1.1", httpclient: "4.5.14", - jackson: "2.13.5", - jacksonDatabind: "2.13.5", + jackson: "2.16.0", jacoco: "0.8.10", javassist: "3.29.2-GA", jetty: "9.4.53.v20231009", @@ -186,7 +185,7 @@ libs += [ commonsValidator: "commons-validator:commons-validator:$versions.commonsValidator", easymock: "org.easymock:easymock:$easymockVersion", jacksonAnnotations: "com.fasterxml.jackson.core:jackson-annotations:$versions.jackson", - jacksonDatabind: "com.fasterxml.jackson.core:jackson-databind:$versions.jacksonDatabind", + jacksonDatabind: "com.fasterxml.jackson.core:jackson-databind:$versions.jackson", jacksonDataformatCsv: "com.fasterxml.jackson.dataformat:jackson-dataformat-csv:$versions.jackson", jacksonModuleScala: "com.fasterxml.jackson.module:jackson-module-scala_$versions.baseScala:$versions.jackson", jacksonJDK8Datatypes: "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:$versions.jackson",