From 799a03e98dbac96a659c81af8f1215afaad423f2 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Tue, 13 Oct 2015 16:44:51 +0200 Subject: [PATCH] Polishing --- .../json/Jackson2ObjectMapperBuilder.java | 5 +-- .../json/Jackson2ObjectMapperFactoryBean.java | 34 +++++++++---------- .../jetty/JettyRequestUpgradeStrategy.java | 2 +- .../support/DefaultHandshakeHandler.java | 2 +- 4 files changed, 22 insertions(+), 21 deletions(-) diff --git a/spring-web/src/main/java/org/springframework/http/converter/json/Jackson2ObjectMapperBuilder.java b/spring-web/src/main/java/org/springframework/http/converter/json/Jackson2ObjectMapperBuilder.java index 5c803b236d9..290c32a4eeb 100644 --- a/spring-web/src/main/java/org/springframework/http/converter/json/Jackson2ObjectMapperBuilder.java +++ b/spring-web/src/main/java/org/springframework/http/converter/json/Jackson2ObjectMapperBuilder.java @@ -66,7 +66,7 @@ import org.springframework.util.StringUtils; *

Note that Jackson's JSR-310 and Joda-Time support modules will be registered automatically * when available (and when Java 8 and Joda-Time themselves are available, respectively). * - *

Tested against Jackson 2.2, 2.3 and 2.4; compatible with Jackson 2.0 and higher. + *

Tested against Jackson 2.2, 2.3, 2.4 and 2.5; compatible with Jackson 2.0 and higher. * * @author Sebastien Deleuze * @author Juergen Hoeller @@ -451,6 +451,7 @@ public class Jackson2ObjectMapperBuilder { * @see #modulesToInstall(Module...) * @see com.fasterxml.jackson.databind.Module */ + @SuppressWarnings("unchecked") public Jackson2ObjectMapperBuilder modulesToInstall(Class... modules) { this.moduleClasses = modules; this.findWellKnownModules = true; @@ -500,6 +501,7 @@ public class Jackson2ObjectMapperBuilder { return this; } + /** * Build a new {@link ObjectMapper} instance. *

Each build operation produces an independent {@link ObjectMapper} instance. @@ -682,7 +684,6 @@ public class Jackson2ObjectMapperBuilder { * Obtain a {@link Jackson2ObjectMapperBuilder} instance in order to * build an {@link XmlMapper} instance. */ - @SuppressWarnings("unchecked") public static Jackson2ObjectMapperBuilder xml() { return new Jackson2ObjectMapperBuilder().createXmlMapper(true); } diff --git a/spring-web/src/main/java/org/springframework/http/converter/json/Jackson2ObjectMapperFactoryBean.java b/spring-web/src/main/java/org/springframework/http/converter/json/Jackson2ObjectMapperFactoryBean.java index 0058b0f74ce..dfbc96fb64c 100644 --- a/spring-web/src/main/java/org/springframework/http/converter/json/Jackson2ObjectMapperFactoryBean.java +++ b/spring-web/src/main/java/org/springframework/http/converter/json/Jackson2ObjectMapperFactoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2015 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. @@ -118,7 +118,7 @@ import org.springframework.context.ApplicationContextAware; * Note that Jackson's JSR-310 and Joda-Time support modules will be registered automatically * when available (and when Java 8 and Joda-Time themselves are available, respectively). * - *

Tested against Jackson 2.2, 2.3 and 2.4; compatible with Jackson 2.0 and higher. + *

Tested against Jackson 2.2, 2.3, 2.4 and 2.5; compatible with Jackson 2.0 and higher. * * @author Dmitry Katsubo * @author Rossen Stoyanchev @@ -346,6 +346,7 @@ public class Jackson2ObjectMapperFactoryBean implements FactoryBean... modules) { this.builder.modulesToInstall(modules); } @@ -363,6 +364,11 @@ public class Jackson2ObjectMapperFactoryBean implements FactoryBeanIf the negotiation succeeds, the actual upgrade is delegated to a server-specific * {@link org.springframework.web.socket.server.RequestUpgradeStrategy}, which will update * the response as necessary and initialize the WebSocket. Currently supported servers are - * Jetty 9.x, Tomcat 7.0.47+ and 8.x, Undertow 1.0-1.2, GlassFish 4.1+, WebLogic 12.1.3+. + * Jetty 9.0-9.2, Tomcat 7.0.47+ and 8.x, Undertow 1.0-1.2, GlassFish 4.1+, WebLogic 12.1.3+. * * @author Rossen Stoyanchev * @author Juergen Hoeller