Polishing

This commit is contained in:
Juergen Hoeller
2017-02-18 00:52:12 +01:00
parent 9834c42b5c
commit 0f71f58616
10 changed files with 62 additions and 67 deletions

View File

@@ -141,8 +141,7 @@ class Netty4ClientHttpRequest extends AbstractAsyncClientHttpRequest implements
for (Map.Entry<String, List<String>> entry : headers.entrySet()) {
nettyRequest.headers().add(entry.getKey(), entry.getValue());
}
if (!nettyRequest.headers().contains(HttpHeaders.CONTENT_LENGTH)
&& this.body.buffer().readableBytes() > 0) {
if (!nettyRequest.headers().contains(HttpHeaders.CONTENT_LENGTH) && this.body.buffer().readableBytes() > 0) {
nettyRequest.headers().set(HttpHeaders.CONTENT_LENGTH, this.body.buffer().readableBytes());
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2017 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.
@@ -54,8 +54,7 @@ import org.springframework.web.method.support.ModelAndViewContainer;
* @author Rossen Stoyanchev
* @since 3.1
*/
public class ModelAttributeMethodProcessor
implements HandlerMethodArgumentResolver, HandlerMethodReturnValueHandler {
public class ModelAttributeMethodProcessor implements HandlerMethodArgumentResolver, HandlerMethodReturnValueHandler {
protected final Log logger = LogFactory.getLog(getClass());