Polishing

This commit is contained in:
Juergen Hoeller
2015-03-25 15:28:30 +01:00
parent 5f6ae13002
commit 97f779674f
3 changed files with 12 additions and 11 deletions

View File

@@ -813,7 +813,7 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
// e.g. was ROLE_APPLICATION, now overriding with ROLE_SUPPORT or ROLE_INFRASTRUCTURE
if (this.logger.isWarnEnabled()) {
this.logger.warn("Overriding user-defined bean definition for bean '" + beanName +
" with a framework-generated bean definition ': replacing [" +
"' with a framework-generated bean definition: replacing [" +
oldBeanDefinition + "] with [" + beanDefinition + "]");
}
}

View File

@@ -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.
@@ -23,7 +23,7 @@ import org.springframework.cache.Cache;
/**
* Determine the {@link Cache} instance(s) to use for an intercepted method invocation.
*
* <p>Implementations MUST be thread-safe.
* <p>Implementations must be thread-safe.
*
* @author Stephane Nicoll
* @since 4.1
@@ -32,9 +32,8 @@ public interface CacheResolver {
/**
* Return the cache(s) to use for the specified invocation.
*
* @param context the context of the particular invocation
* @return the cache(s) to use (never null)
* @return the cache(s) to use (never {@code null})
*/
Collection<? extends Cache> resolveCaches(CacheOperationInvocationContext<?> context);

View File

@@ -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();
}