Polishing
This commit is contained in:
@@ -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.
|
||||
@@ -58,25 +58,27 @@ public class HttpEntityMethodProcessor extends AbstractMessageConverterMethodPro
|
||||
|
||||
public HttpEntityMethodProcessor(List<HttpMessageConverter<?>> messageConverters,
|
||||
ContentNegotiationManager contentNegotiationManager) {
|
||||
|
||||
super(messageConverters, contentNegotiationManager);
|
||||
}
|
||||
|
||||
public HttpEntityMethodProcessor(List<HttpMessageConverter<?>> messageConverters,
|
||||
ContentNegotiationManager contentNegotiationManager, List<Object> responseBodyAdvice) {
|
||||
|
||||
super(messageConverters, contentNegotiationManager, responseBodyAdvice);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean supportsParameter(MethodParameter parameter) {
|
||||
return HttpEntity.class.equals(parameter.getParameterType()) ||
|
||||
RequestEntity.class.equals(parameter.getParameterType());
|
||||
return (HttpEntity.class.equals(parameter.getParameterType()) ||
|
||||
RequestEntity.class.equals(parameter.getParameterType()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsReturnType(MethodParameter returnType) {
|
||||
return HttpEntity.class.isAssignableFrom(returnType.getParameterType()) &&
|
||||
!RequestEntity.class.isAssignableFrom(returnType.getParameterType());
|
||||
return (HttpEntity.class.isAssignableFrom(returnType.getParameterType()) &&
|
||||
!RequestEntity.class.isAssignableFrom(returnType.getParameterType()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -143,7 +145,7 @@ public class HttpEntityMethodProcessor extends AbstractMessageConverterMethodPro
|
||||
// Try even with null body. ResponseBodyAdvice could get involved.
|
||||
writeWithMessageConverters(body, returnType, inputMessage, outputMessage);
|
||||
|
||||
// Ensure headers are flushed even if no body was written
|
||||
// Ensure headers are flushed even if no body was written.
|
||||
outputMessage.getBody();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user