Browse Source

Remove jackson-datatype-jdk7 auto registration

`jackson-datatype-jdk7` is not provided anymore. It's handlers are
incorporated in core databind.
pull/1534/head
Eddú Meléndez 7 years ago committed by Brian Clozel
parent
commit
6f2d58fac6
  1. 10
      spring-web/src/main/java/org/springframework/http/converter/json/Jackson2ObjectMapperBuilder.java

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

@ -75,7 +75,6 @@ import org.springframework.util.xml.StaxUtils; @@ -75,7 +75,6 @@ import org.springframework.util.xml.StaxUtils;
* <p>It also automatically registers the following well-known modules if they are
* detected on the classpath:
* <ul>
* <li><a href="https://github.com/FasterXML/jackson-datatype-jdk7">jackson-datatype-jdk7</a>: support for Java 7 types like {@link java.nio.file.Path}</li>
* <li><a href="https://github.com/FasterXML/jackson-datatype-jdk8">jackson-datatype-jdk8</a>: support for other Java 8 types like {@link java.util.Optional}</li>
* <li><a href="https://github.com/FasterXML/jackson-datatype-jsr310">jackson-datatype-jsr310</a>: support for Java 8 Date & Time API types</li>
* <li><a href="https://github.com/FasterXML/jackson-datatype-joda">jackson-datatype-joda</a>: support for Joda-Time types</li>
@ -732,15 +731,6 @@ public class Jackson2ObjectMapperBuilder { @@ -732,15 +731,6 @@ public class Jackson2ObjectMapperBuilder {
@SuppressWarnings("unchecked")
private void registerWellKnownModulesIfAvailable(ObjectMapper objectMapper) {
try {
Class<? extends Module> jdk7Module = (Class<? extends Module>)
ClassUtils.forName("com.fasterxml.jackson.datatype.jdk7.Jdk7Module", this.moduleClassLoader);
objectMapper.registerModule(BeanUtils.instantiateClass(jdk7Module));
}
catch (ClassNotFoundException ex) {
// jackson-datatype-jdk7 not available
}
try {
Class<? extends Module> jdk8Module = (Class<? extends Module>)
ClassUtils.forName("com.fasterxml.jackson.datatype.jdk8.Jdk8Module", this.moduleClassLoader);

Loading…
Cancel
Save