Skip to content

Commit 8fc84e2

Browse files
committed
Upgrade to Jackson 2.8 RC1, Undertow 1.4 CR1, Netty 4.1.1
Issue: SPR-14340 Issue: SPR-14328 Issue: SPR-14143
1 parent 981c894 commit 8fc84e2

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ configure(allprojects) { project ->
5252
ext.hsqldbVersion = "2.3.4"
5353
ext.httpasyncVersion = "4.1.1"
5454
ext.httpclientVersion = "4.5.2"
55-
ext.jackson2Version = "2.7.4"
55+
ext.jackson2Version = "2.8.0.rc1"
5656
ext.jasperreportsVersion = "6.2.1"
5757
ext.javamailVersion = "1.5.5"
5858
ext.jettyVersion = "9.3.9.v20160517"
5959
ext.jodaVersion = "2.9.4"
6060
ext.jrubyVersion = "1.7.25" // JRuby 9000 only supported through JSR-223 (StandardScriptFactory)
6161
ext.jtaVersion = "1.2"
6262
ext.junitVersion = "4.12"
63-
ext.nettyVersion = "4.1.0.Final"
63+
ext.nettyVersion = "4.1.1.Final"
6464
ext.okhttpVersion = "2.7.5"
6565
ext.okhttp3Version = "3.3.1"
6666
ext.openjpaVersion = "2.4.1"
@@ -75,7 +75,7 @@ configure(allprojects) { project ->
7575
ext.tiles3Version = "3.0.5"
7676
ext.tomcatVersion = "8.5.2"
7777
ext.tyrusVersion = "1.3.5" // constrained by WebLogic 12.1.3 support
78-
ext.undertowVersion = "1.4.0.Beta1"
78+
ext.undertowVersion = "1.4.0.CR1"
7979
ext.xmlunitVersion = "1.6"
8080
ext.xstreamVersion = "1.4.9"
8181

spring-web/src/test/java/org/springframework/http/converter/json/Jackson2ObjectMapperBuilderTests.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464
import com.fasterxml.jackson.databind.ser.std.NumberSerializer;
6565
import com.fasterxml.jackson.databind.type.SimpleType;
6666
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
67-
6867
import kotlin.ranges.IntRange;
6968
import org.joda.time.DateTime;
7069
import org.joda.time.DateTimeZone;
@@ -253,7 +252,7 @@ public void wellKnownModules() throws JsonProcessingException, UnsupportedEncodi
253252
assertEquals(timestamp.toString(), new String(objectMapper.writeValueAsBytes(dateTime), "UTF-8"));
254253

255254
Path file = Paths.get("foo");
256-
assertEquals("\"foo\"", new String(objectMapper.writeValueAsBytes(file), "UTF-8"));
255+
assertTrue(new String(objectMapper.writeValueAsBytes(file), "UTF-8").endsWith("foo\""));
257256

258257
Optional<String> optional = Optional.of("test");
259258
assertEquals("\"test\"", new String(objectMapper.writeValueAsBytes(optional), "UTF-8"));
@@ -263,7 +262,7 @@ public void wellKnownModules() throws JsonProcessingException, UnsupportedEncodi
263262
assertEquals("{\"start\":1,\"end\":3}", new String(objectMapper.writeValueAsBytes(range), "UTF-8"));
264263
}
265264

266-
@Test // SPR-12634
265+
@Test // SPR-12634
267266
public void customizeWellKnownModulesWithModule() throws JsonProcessingException, UnsupportedEncodingException {
268267
ObjectMapper objectMapper = Jackson2ObjectMapperBuilder.json()
269268
.modulesToInstall(new CustomIntegerModule()).build();
@@ -272,7 +271,7 @@ public void customizeWellKnownModulesWithModule() throws JsonProcessingException
272271
assertThat(new String(objectMapper.writeValueAsBytes(new Integer(4)), "UTF-8"), containsString("customid"));
273272
}
274273

275-
@Test // SPR-12634
274+
@Test // SPR-12634
276275
@SuppressWarnings("unchecked")
277276
public void customizeWellKnownModulesWithModuleClass() throws JsonProcessingException, UnsupportedEncodingException {
278277
ObjectMapper objectMapper = Jackson2ObjectMapperBuilder.json().modulesToInstall(CustomIntegerModule.class).build();
@@ -281,7 +280,7 @@ public void customizeWellKnownModulesWithModuleClass() throws JsonProcessingExce
281280
assertThat(new String(objectMapper.writeValueAsBytes(new Integer(4)), "UTF-8"), containsString("customid"));
282281
}
283282

284-
@Test // SPR-12634
283+
@Test // SPR-12634
285284
public void customizeWellKnownModulesWithSerializer() throws JsonProcessingException, UnsupportedEncodingException {
286285
ObjectMapper objectMapper = Jackson2ObjectMapperBuilder.json()
287286
.serializerByType(Integer.class, new CustomIntegerSerializer()).build();
@@ -520,6 +519,7 @@ public void setProperty2(String property2) {
520519
}
521520
}
522521

522+
523523
public static class ListContainer<T> {
524524

525525
private List<T> list;

spring-web/src/test/java/org/springframework/http/converter/json/SpringHandlerInstantiatorTests.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
import com.fasterxml.jackson.databind.jsontype.TypeSerializer;
4848
import com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder;
4949
import com.fasterxml.jackson.databind.type.TypeFactory;
50-
5150
import org.junit.Before;
5251
import org.junit.Test;
5352

@@ -197,7 +196,7 @@ public JsonTypeInfo.Id getMechanism() {
197196
return JsonTypeInfo.Id.CUSTOM;
198197
}
199198

200-
@Override
199+
// Only needed when compiling against Jackson 2.7; gone in 2.8
201200
@SuppressWarnings("deprecation")
202201
public JavaType typeFromId(String s) {
203202
return TypeFactory.defaultInstance().constructFromCanonical(s);

0 commit comments

Comments
 (0)