Upgrade to Jackson 2.8 RC1, Undertow 1.4 CR1, Netty 4.1.1
Issue: SPR-14340 Issue: SPR-14328 Issue: SPR-14143
This commit is contained in:
parent
981c894acf
commit
8fc84e2d6f
|
@ -52,7 +52,7 @@ configure(allprojects) { project ->
|
|||
ext.hsqldbVersion = "2.3.4"
|
||||
ext.httpasyncVersion = "4.1.1"
|
||||
ext.httpclientVersion = "4.5.2"
|
||||
ext.jackson2Version = "2.7.4"
|
||||
ext.jackson2Version = "2.8.0.rc1"
|
||||
ext.jasperreportsVersion = "6.2.1"
|
||||
ext.javamailVersion = "1.5.5"
|
||||
ext.jettyVersion = "9.3.9.v20160517"
|
||||
|
@ -60,7 +60,7 @@ configure(allprojects) { project ->
|
|||
ext.jrubyVersion = "1.7.25" // JRuby 9000 only supported through JSR-223 (StandardScriptFactory)
|
||||
ext.jtaVersion = "1.2"
|
||||
ext.junitVersion = "4.12"
|
||||
ext.nettyVersion = "4.1.0.Final"
|
||||
ext.nettyVersion = "4.1.1.Final"
|
||||
ext.okhttpVersion = "2.7.5"
|
||||
ext.okhttp3Version = "3.3.1"
|
||||
ext.openjpaVersion = "2.4.1"
|
||||
|
@ -75,7 +75,7 @@ configure(allprojects) { project ->
|
|||
ext.tiles3Version = "3.0.5"
|
||||
ext.tomcatVersion = "8.5.2"
|
||||
ext.tyrusVersion = "1.3.5" // constrained by WebLogic 12.1.3 support
|
||||
ext.undertowVersion = "1.4.0.Beta1"
|
||||
ext.undertowVersion = "1.4.0.CR1"
|
||||
ext.xmlunitVersion = "1.6"
|
||||
ext.xstreamVersion = "1.4.9"
|
||||
|
||||
|
|
|
@ -64,7 +64,6 @@ import com.fasterxml.jackson.databind.ser.std.ClassSerializer;
|
|||
import com.fasterxml.jackson.databind.ser.std.NumberSerializer;
|
||||
import com.fasterxml.jackson.databind.type.SimpleType;
|
||||
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
|
||||
|
||||
import kotlin.ranges.IntRange;
|
||||
import org.joda.time.DateTime;
|
||||
import org.joda.time.DateTimeZone;
|
||||
|
@ -253,7 +252,7 @@ public class Jackson2ObjectMapperBuilderTests {
|
|||
assertEquals(timestamp.toString(), new String(objectMapper.writeValueAsBytes(dateTime), "UTF-8"));
|
||||
|
||||
Path file = Paths.get("foo");
|
||||
assertEquals("\"foo\"", new String(objectMapper.writeValueAsBytes(file), "UTF-8"));
|
||||
assertTrue(new String(objectMapper.writeValueAsBytes(file), "UTF-8").endsWith("foo\""));
|
||||
|
||||
Optional<String> optional = Optional.of("test");
|
||||
assertEquals("\"test\"", new String(objectMapper.writeValueAsBytes(optional), "UTF-8"));
|
||||
|
@ -263,7 +262,7 @@ public class Jackson2ObjectMapperBuilderTests {
|
|||
assertEquals("{\"start\":1,\"end\":3}", new String(objectMapper.writeValueAsBytes(range), "UTF-8"));
|
||||
}
|
||||
|
||||
@Test // SPR-12634
|
||||
@Test // SPR-12634
|
||||
public void customizeWellKnownModulesWithModule() throws JsonProcessingException, UnsupportedEncodingException {
|
||||
ObjectMapper objectMapper = Jackson2ObjectMapperBuilder.json()
|
||||
.modulesToInstall(new CustomIntegerModule()).build();
|
||||
|
@ -272,7 +271,7 @@ public class Jackson2ObjectMapperBuilderTests {
|
|||
assertThat(new String(objectMapper.writeValueAsBytes(new Integer(4)), "UTF-8"), containsString("customid"));
|
||||
}
|
||||
|
||||
@Test // SPR-12634
|
||||
@Test // SPR-12634
|
||||
@SuppressWarnings("unchecked")
|
||||
public void customizeWellKnownModulesWithModuleClass() throws JsonProcessingException, UnsupportedEncodingException {
|
||||
ObjectMapper objectMapper = Jackson2ObjectMapperBuilder.json().modulesToInstall(CustomIntegerModule.class).build();
|
||||
|
@ -281,7 +280,7 @@ public class Jackson2ObjectMapperBuilderTests {
|
|||
assertThat(new String(objectMapper.writeValueAsBytes(new Integer(4)), "UTF-8"), containsString("customid"));
|
||||
}
|
||||
|
||||
@Test // SPR-12634
|
||||
@Test // SPR-12634
|
||||
public void customizeWellKnownModulesWithSerializer() throws JsonProcessingException, UnsupportedEncodingException {
|
||||
ObjectMapper objectMapper = Jackson2ObjectMapperBuilder.json()
|
||||
.serializerByType(Integer.class, new CustomIntegerSerializer()).build();
|
||||
|
@ -520,6 +519,7 @@ public class Jackson2ObjectMapperBuilderTests {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public static class ListContainer<T> {
|
||||
|
||||
private List<T> list;
|
||||
|
|
|
@ -47,7 +47,6 @@ import com.fasterxml.jackson.databind.jsontype.TypeIdResolver;
|
|||
import com.fasterxml.jackson.databind.jsontype.TypeSerializer;
|
||||
import com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder;
|
||||
import com.fasterxml.jackson.databind.type.TypeFactory;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
|
@ -197,7 +196,7 @@ public class SpringHandlerInstantiatorTests {
|
|||
return JsonTypeInfo.Id.CUSTOM;
|
||||
}
|
||||
|
||||
@Override
|
||||
// Only needed when compiling against Jackson 2.7; gone in 2.8
|
||||
@SuppressWarnings("deprecation")
|
||||
public JavaType typeFromId(String s) {
|
||||
return TypeFactory.defaultInstance().constructFromCanonical(s);
|
||||
|
|
Loading…
Reference in New Issue