Skip to content

Commit 30dc868

Browse files
committed
Upgrade to Jackson 2.18
Closes gh-33615
1 parent 38c9af2 commit 30dc868

File tree

7 files changed

+10
-4
lines changed

7 files changed

+10
-4
lines changed

framework-platform/framework-platform.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ javaPlatform {
77
}
88

99
dependencies {
10-
api(platform("com.fasterxml.jackson:jackson-bom:2.15.4"))
10+
api(platform("com.fasterxml.jackson:jackson-bom:2.18.0"))
1111
api(platform("io.micrometer:micrometer-bom:1.14.0-M3"))
1212
api(platform("io.netty:netty-bom:4.1.113.Final"))
1313
api(platform("io.netty:netty5-bom:5.0.0.Alpha5"))

spring-messaging/src/main/java/org/springframework/messaging/converter/MappingJackson2MessageConverter.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -159,6 +159,7 @@ private void configurePrettyPrint() {
159159
}
160160

161161

162+
@SuppressWarnings("deprecation") // as of Jackson 2.18: can(De)Serialize
162163
@Override
163164
protected boolean canConvertFrom(Message<?> message, @Nullable Class<?> targetClass) {
164165
if (targetClass == null || !supportsMimeType(message.getHeaders())) {
@@ -173,6 +174,7 @@ protected boolean canConvertFrom(Message<?> message, @Nullable Class<?> targetCl
173174
return false;
174175
}
175176

177+
@SuppressWarnings("deprecation") // as of Jackson 2.18: can(De)Serialize
176178
@Override
177179
protected boolean canConvertTo(Object payload, @Nullable MessageHeaders headers) {
178180
if (!supportsMimeType(headers)) {

spring-web/src/main/java/org/springframework/http/codec/json/AbstractJackson2Decoder.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ public int getMaxInMemorySize() {
9696
}
9797

9898

99+
@SuppressWarnings("deprecation") // as of Jackson 2.18: can(De)Serialize
99100
@Override
100101
public boolean canDecode(ResolvableType elementType, @Nullable MimeType mimeType) {
101102
if (!supportsMimeType(mimeType)) {

spring-web/src/main/java/org/springframework/http/codec/json/AbstractJackson2Encoder.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ public void setStreamingMediaTypes(List<MediaType> mediaTypes) {
105105
}
106106

107107

108+
@SuppressWarnings("deprecation") // as of Jackson 2.18: can(De)Serialize
108109
@Override
109110
public boolean canEncode(ResolvableType elementType, @Nullable MimeType mimeType) {
110111
if (!supportsMimeType(mimeType)) {

spring-web/src/main/java/org/springframework/http/converter/json/AbstractJackson2HttpMessageConverter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ public boolean canRead(Class<?> clazz, @Nullable MediaType mediaType) {
249249
return canRead(clazz, null, mediaType);
250250
}
251251

252+
@SuppressWarnings("deprecation") // as of Jackson 2.18: can(De)Serialize
252253
@Override
253254
public boolean canRead(Type type, @Nullable Class<?> contextClass, @Nullable MediaType mediaType) {
254255
if (!canRead(mediaType)) {
@@ -267,6 +268,7 @@ public boolean canRead(Type type, @Nullable Class<?> contextClass, @Nullable Med
267268
return false;
268269
}
269270

271+
@SuppressWarnings("deprecation") // as of Jackson 2.18: can(De)Serialize
270272
@Override
271273
public boolean canWrite(Class<?> clazz, @Nullable MediaType mediaType) {
272274
if (!canWrite(mediaType)) {

spring-web/src/main/java/org/springframework/http/converter/json/Jackson2ObjectMapperBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
* support for Java 8 Date &amp; Time API types</li>
8989
* <li><a href="https://github.com/FasterXML/jackson-module-kotlin">jackson-module-kotlin</a>:
9090
* support for Kotlin classes and data classes</li>
91-
* <li><a href="https://github.com/FasterXML/jackson-modules-java8/tree/2.17/parameter-names">jackson-modules-java8/parameter-names</a>:
91+
* <li><a href="https://github.com/FasterXML/jackson-modules-java8/tree/2.18/parameter-names">jackson-modules-java8/parameter-names</a>:
9292
* support for accessing parameter names</li>
9393
* </ul>
9494
*

spring-web/src/main/java/org/springframework/http/converter/yaml/MappingJackson2YamlHttpMessageConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
/**
2828
* Implementation of {@link org.springframework.http.converter.HttpMessageConverter
2929
* HttpMessageConverter} that can read and write the <a href="https://yaml.io/">YAML</a>
30-
* data format using <a href="https://github.com/FasterXML/jackson-dataformats-text/tree/2.17/yaml">
30+
* data format using <a href="https://github.com/FasterXML/jackson-dataformats-text/tree/2.18/yaml">
3131
* the dedicated Jackson 2.x extension</a>.
3232
*
3333
* <p>By default, this converter supports the {@link MediaType#APPLICATION_YAML_VALUE}

0 commit comments

Comments
 (0)