Skip to content

Commit

Permalink
Upgrade to Jackson 2.18
Browse files Browse the repository at this point in the history
Closes gh-33615
  • Loading branch information
jhoeller committed Sep 30, 2024
1 parent 38c9af2 commit 30dc868
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion framework-platform/framework-platform.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ javaPlatform {
}

dependencies {
api(platform("com.fasterxml.jackson:jackson-bom:2.15.4"))
api(platform("com.fasterxml.jackson:jackson-bom:2.18.0"))
api(platform("io.micrometer:micrometer-bom:1.14.0-M3"))
api(platform("io.netty:netty-bom:4.1.113.Final"))
api(platform("io.netty:netty5-bom:5.0.0.Alpha5"))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -159,6 +159,7 @@ private void configurePrettyPrint() {
}


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

@SuppressWarnings("deprecation") // as of Jackson 2.18: can(De)Serialize
@Override
protected boolean canConvertTo(Object payload, @Nullable MessageHeaders headers) {
if (!supportsMimeType(headers)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ public int getMaxInMemorySize() {
}


@SuppressWarnings("deprecation") // as of Jackson 2.18: can(De)Serialize
@Override
public boolean canDecode(ResolvableType elementType, @Nullable MimeType mimeType) {
if (!supportsMimeType(mimeType)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ public void setStreamingMediaTypes(List<MediaType> mediaTypes) {
}


@SuppressWarnings("deprecation") // as of Jackson 2.18: can(De)Serialize
@Override
public boolean canEncode(ResolvableType elementType, @Nullable MimeType mimeType) {
if (!supportsMimeType(mimeType)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ public boolean canRead(Class<?> clazz, @Nullable MediaType mediaType) {
return canRead(clazz, null, mediaType);
}

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

@SuppressWarnings("deprecation") // as of Jackson 2.18: can(De)Serialize
@Override
public boolean canWrite(Class<?> clazz, @Nullable MediaType mediaType) {
if (!canWrite(mediaType)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
* support for Java 8 Date &amp; Time API types</li>
* <li><a href="https://github.com/FasterXML/jackson-module-kotlin">jackson-module-kotlin</a>:
* support for Kotlin classes and data classes</li>
* <li><a href="https://github.com/FasterXML/jackson-modules-java8/tree/2.17/parameter-names">jackson-modules-java8/parameter-names</a>:
* <li><a href="https://github.com/FasterXML/jackson-modules-java8/tree/2.18/parameter-names">jackson-modules-java8/parameter-names</a>:
* support for accessing parameter names</li>
* </ul>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
/**
* Implementation of {@link org.springframework.http.converter.HttpMessageConverter
* HttpMessageConverter} that can read and write the <a href="https://yaml.io/">YAML</a>
* data format using <a href="https://github.com/FasterXML/jackson-dataformats-text/tree/2.17/yaml">
* data format using <a href="https://github.com/FasterXML/jackson-dataformats-text/tree/2.18/yaml">
* the dedicated Jackson 2.x extension</a>.
*
* <p>By default, this converter supports the {@link MediaType#APPLICATION_YAML_VALUE}
Expand Down

0 comments on commit 30dc868

Please sign in to comment.