Skip to content

Commit 842afa4

Browse files
committed
Upgrade to Jackson 2.18.0
Closes spring-projectsgh-42480
1 parent 42ad6dd commit 842afa4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ checkstyleToolVersion=10.12.4
1111
commonsCodecVersion=1.17.1
1212
graalVersion=22.3
1313
hamcrestVersion=2.2
14-
jacksonVersion=2.17.2
14+
jacksonVersion=2.18.0
1515
javaFormatVersion=0.0.43
1616
junitJupiterVersion=5.11.0
1717
kotlinVersion=1.9.25

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jackson/JacksonAutoConfigurationTests.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
import com.fasterxml.jackson.databind.cfg.JsonNodeFeature;
5050
import com.fasterxml.jackson.databind.exc.InvalidFormatException;
5151
import com.fasterxml.jackson.databind.module.SimpleModule;
52+
import com.fasterxml.jackson.databind.ser.DefaultSerializerProvider;
5253
import com.fasterxml.jackson.databind.util.StdDateFormat;
5354
import com.fasterxml.jackson.module.paramnames.ParameterNamesModule;
5455
import org.assertj.core.api.InstanceOfAssertFactories;
@@ -318,7 +319,8 @@ void moduleBeansAndWellKnownModulesAreRegisteredWithTheObjectMapperBuilder() {
318319
this.contextRunner.withUserConfiguration(ModuleConfig.class).run((context) -> {
319320
ObjectMapper objectMapper = context.getBean(Jackson2ObjectMapperBuilder.class).build();
320321
assertThat(context.getBean(CustomModule.class).getOwners()).contains(objectMapper);
321-
assertThat(objectMapper.canSerialize(Baz.class)).isTrue();
322+
assertThat(((DefaultSerializerProvider) objectMapper.getSerializerProviderInstance())
323+
.hasSerializerFor(Baz.class, null)).isTrue();
322324
});
323325
}
324326

0 commit comments

Comments
 (0)