Skip to content

Commit

Permalink
KAFKA-15208: Upgrade Jackson dependencies to version 2.16.0 (#13662)
Browse files Browse the repository at this point in the history
Reviewers: Mickael Maison <[email protected]>, Divij Vaidya <[email protected]>
  • Loading branch information
bmscomp authored and mimaison committed Dec 19, 2023
1 parent 51a4514 commit 62c7e8b
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
20 changes: 10 additions & 10 deletions LICENSE-binary
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

static {
LOGICAL_CONVERTERS.put(Decimal.LOGICAL_NAME, new LogicalTypeConverter() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class JsonDeserializer implements Deserializer<JsonNode> {
* Default constructor needed by Kafka
*/
public JsonDeserializer() {
this(Collections.emptySet(), JsonNodeFactory.withExactBigDecimals(true));
this(Collections.emptySet(), new JsonNodeFactory(true));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class JsonSerializer implements Serializer<JsonNode> {
* Default constructor needed by Kafka
*/
public JsonSerializer() {
this(Collections.emptySet(), JsonNodeFactory.withExactBigDecimals(true));
this(Collections.emptySet(), new JsonNodeFactory(true));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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();

Expand Down Expand Up @@ -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<String, String> workerProps = !workerPropsFile.isEmpty() ?
Expand Down
5 changes: 2 additions & 3 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 62c7e8b

Please sign in to comment.