Upgrade build to Spring 5.0.0-BUILD-SNAPSHOT
* update bean validation API version
* MethodParameter now validates indices, see 39e3f2ebf6
* `getCharSet()` is now `getCharset()`
This commit is contained in:
@@ -27,7 +27,7 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
springVersion = '4.3.0.RELEASE'
|
springVersion = '5.0.0.BUILD-SNAPSHOT'
|
||||||
reactorVersion = '2.5.0.BUILD-SNAPSHOT'
|
reactorVersion = '2.5.0.BUILD-SNAPSHOT'
|
||||||
reactorNettyVersion = '2.5.0.BUILD-SNAPSHOT'
|
reactorNettyVersion = '2.5.0.BUILD-SNAPSHOT'
|
||||||
rxJavaVersion = '1.1.6'
|
rxJavaVersion = '1.1.6'
|
||||||
@@ -112,7 +112,7 @@ dependencies {
|
|||||||
optional "org.eclipse.jetty:jetty-servlet:${jettyVersion}"
|
optional "org.eclipse.jetty:jetty-servlet:${jettyVersion}"
|
||||||
optional("org.freemarker:freemarker:2.3.23")
|
optional("org.freemarker:freemarker:2.3.23")
|
||||||
optional("com.fasterxml:aalto-xml:1.0.0")
|
optional("com.fasterxml:aalto-xml:1.0.0")
|
||||||
optional("javax.validation:validation-api:1.0.0.GA")
|
optional("javax.validation:validation-api:1.1.0.Final")
|
||||||
|
|
||||||
provided "javax.servlet:javax.servlet-api:3.1.0"
|
provided "javax.servlet:javax.servlet-api:3.1.0"
|
||||||
|
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ public class ServletServerHttpRequest extends AbstractServerHttpRequest {
|
|||||||
headers.setContentType(contentType);
|
headers.setContentType(contentType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (contentType != null && contentType.getCharSet() == null) {
|
if (contentType != null && contentType.getCharset() == null) {
|
||||||
String encoding = getServletRequest().getCharacterEncoding();
|
String encoding = getServletRequest().getCharacterEncoding();
|
||||||
if (StringUtils.hasLength(encoding)) {
|
if (StringUtils.hasLength(encoding)) {
|
||||||
Charset charset = Charset.forName(encoding);
|
Charset charset = Charset.forName(encoding);
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ public class ServletServerHttpResponse extends AbstractServerHttpResponse {
|
|||||||
if (this.response.getContentType() == null && contentType != null) {
|
if (this.response.getContentType() == null && contentType != null) {
|
||||||
this.response.setContentType(contentType.toString());
|
this.response.setContentType(contentType.toString());
|
||||||
}
|
}
|
||||||
Charset charset = (contentType != null ? contentType.getCharSet() : null);
|
Charset charset = (contentType != null ? contentType.getCharset() : null);
|
||||||
if (this.response.getCharacterEncoding() == null && charset != null) {
|
if (this.response.getCharacterEncoding() == null && charset != null) {
|
||||||
this.response.setCharacterEncoding(charset.name());
|
this.response.setCharacterEncoding(charset.name());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -154,7 +154,8 @@ public class RequestAttributeMethodArgumentResolverTests {
|
|||||||
@RequestAttribute Foo foo,
|
@RequestAttribute Foo foo,
|
||||||
@RequestAttribute("specialFoo") Foo namedFoo,
|
@RequestAttribute("specialFoo") Foo namedFoo,
|
||||||
@RequestAttribute(name="foo", required = false) Foo notRequiredFoo,
|
@RequestAttribute(name="foo", required = false) Foo notRequiredFoo,
|
||||||
@RequestAttribute(name="foo") Optional<Foo> optionalFoo) {
|
@RequestAttribute(name="foo") Optional<Foo> optionalFoo,
|
||||||
|
String notSupported) {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class Foo {
|
private static class Foo {
|
||||||
|
|||||||
@@ -161,7 +161,8 @@ public class SessionAttributeMethodArgumentResolverTests {
|
|||||||
@SessionAttribute Foo foo,
|
@SessionAttribute Foo foo,
|
||||||
@SessionAttribute("specialFoo") Foo namedFoo,
|
@SessionAttribute("specialFoo") Foo namedFoo,
|
||||||
@SessionAttribute(name="foo", required = false) Foo notRequiredFoo,
|
@SessionAttribute(name="foo", required = false) Foo notRequiredFoo,
|
||||||
@SessionAttribute(name="foo") Optional<Foo> optionalFoo) {
|
@SessionAttribute(name="foo") Optional<Foo> optionalFoo,
|
||||||
|
String notSupported) {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class Foo {
|
private static class Foo {
|
||||||
|
|||||||
Reference in New Issue
Block a user