Skip to content

Commit 97f7796

Browse files
committed
Polishing
1 parent 5f6ae13 commit 97f7796

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ else if (oldBeanDefinition.getRole() < beanDefinition.getRole()) {
813813
// e.g. was ROLE_APPLICATION, now overriding with ROLE_SUPPORT or ROLE_INFRASTRUCTURE
814814
if (this.logger.isWarnEnabled()) {
815815
this.logger.warn("Overriding user-defined bean definition for bean '" + beanName +
816-
" with a framework-generated bean definition ': replacing [" +
816+
"' with a framework-generated bean definition: replacing [" +
817817
oldBeanDefinition + "] with [" + beanDefinition + "]");
818818
}
819819
}

spring-context/src/main/java/org/springframework/cache/interceptor/CacheResolver.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2014 the original author or authors.
2+
* Copyright 2002-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@
2323
/**
2424
* Determine the {@link Cache} instance(s) to use for an intercepted method invocation.
2525
*
26-
* <p>Implementations MUST be thread-safe.
26+
* <p>Implementations must be thread-safe.
2727
*
2828
* @author Stephane Nicoll
2929
* @since 4.1
@@ -32,9 +32,8 @@ public interface CacheResolver {
3232

3333
/**
3434
* Return the cache(s) to use for the specified invocation.
35-
*
3635
* @param context the context of the particular invocation
37-
* @return the cache(s) to use (never null)
36+
* @return the cache(s) to use (never {@code null})
3837
*/
3938
Collection<? extends Cache> resolveCaches(CacheOperationInvocationContext<?> context);
4039

spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/HttpEntityMethodProcessor.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2014 the original author or authors.
2+
* Copyright 2002-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -58,25 +58,27 @@ public HttpEntityMethodProcessor(List<HttpMessageConverter<?>> messageConverters
5858

5959
public HttpEntityMethodProcessor(List<HttpMessageConverter<?>> messageConverters,
6060
ContentNegotiationManager contentNegotiationManager) {
61+
6162
super(messageConverters, contentNegotiationManager);
6263
}
6364

6465
public HttpEntityMethodProcessor(List<HttpMessageConverter<?>> messageConverters,
6566
ContentNegotiationManager contentNegotiationManager, List<Object> responseBodyAdvice) {
67+
6668
super(messageConverters, contentNegotiationManager, responseBodyAdvice);
6769
}
6870

6971

7072
@Override
7173
public boolean supportsParameter(MethodParameter parameter) {
72-
return HttpEntity.class.equals(parameter.getParameterType()) ||
73-
RequestEntity.class.equals(parameter.getParameterType());
74+
return (HttpEntity.class.equals(parameter.getParameterType()) ||
75+
RequestEntity.class.equals(parameter.getParameterType()));
7476
}
7577

7678
@Override
7779
public boolean supportsReturnType(MethodParameter returnType) {
78-
return HttpEntity.class.isAssignableFrom(returnType.getParameterType()) &&
79-
!RequestEntity.class.isAssignableFrom(returnType.getParameterType());
80+
return (HttpEntity.class.isAssignableFrom(returnType.getParameterType()) &&
81+
!RequestEntity.class.isAssignableFrom(returnType.getParameterType()));
8082
}
8183

8284
@Override
@@ -143,7 +145,7 @@ public void handleReturnValue(Object returnValue, MethodParameter returnType,
143145
// Try even with null body. ResponseBodyAdvice could get involved.
144146
writeWithMessageConverters(body, returnType, inputMessage, outputMessage);
145147

146-
// Ensure headers are flushed even if no body was written
148+
// Ensure headers are flushed even if no body was written.
147149
outputMessage.getBody();
148150
}
149151

0 commit comments

Comments
 (0)