Skip to content

Commit 14f24f4

Browse files
committed
Polishing
1 parent d7e0eed commit 14f24f4

File tree

12 files changed

+31
-43
lines changed

12 files changed

+31
-43
lines changed

spring-beans/src/main/java/org/springframework/beans/factory/config/InstantiationAwareBeanPostProcessor.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2021 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.
@@ -34,9 +34,7 @@
3434
*
3535
* <p><b>NOTE:</b> This interface is a special purpose interface, mainly for
3636
* internal use within the framework. It is recommended to implement the plain
37-
* {@link BeanPostProcessor} interface as far as possible, or to derive from
38-
* {@link InstantiationAwareBeanPostProcessorAdapter} in order to be shielded
39-
* from extensions to this interface.
37+
* {@link BeanPostProcessor} interface as far as possible.
4038
*
4139
* @author Juergen Hoeller
4240
* @author Rod Johnson

spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/AbstractFallbackJCacheOperationSource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2021 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.
@@ -79,7 +79,7 @@ public JCacheOperation<?> getCacheOperation(Method method, @Nullable Class<?> ta
7979

8080
@Nullable
8181
private JCacheOperation<?> computeCacheOperation(Method method, @Nullable Class<?> targetClass) {
82-
// Don't allow no-public methods as required.
82+
// Don't allow non-public methods, as configured.
8383
if (allowPublicMethodsOnly() && !Modifier.isPublic(method.getModifiers())) {
8484
return null;
8585
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2021 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.
@@ -124,7 +124,7 @@ protected Object getCacheKey(Method method, @Nullable Class<?> targetClass) {
124124

125125
@Nullable
126126
private Collection<CacheOperation> computeCacheOperations(Method method, @Nullable Class<?> targetClass) {
127-
// Don't allow no-public methods as required.
127+
// Don't allow non-public methods, as configured.
128128
if (allowPublicMethodsOnly() && !Modifier.isPublic(method.getModifiers())) {
129129
return null;
130130
}

spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolExecutorFactoryBean.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@
2626
import java.util.concurrent.ThreadPoolExecutor;
2727
import java.util.concurrent.TimeUnit;
2828

29-
import org.springframework.beans.factory.DisposableBean;
3029
import org.springframework.beans.factory.FactoryBean;
31-
import org.springframework.beans.factory.InitializingBean;
3230
import org.springframework.lang.Nullable;
3331

3432
/**
@@ -65,7 +63,7 @@
6563
*/
6664
@SuppressWarnings("serial")
6765
public class ThreadPoolExecutorFactoryBean extends ExecutorConfigurationSupport
68-
implements FactoryBean<ExecutorService>, InitializingBean, DisposableBean {
66+
implements FactoryBean<ExecutorService> {
6967

7068
private int corePoolSize = 1;
7169

spring-test/src/main/java/org/springframework/test/web/client/match/ContentRequestMatchers.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2021 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.
@@ -193,7 +193,7 @@ private RequestMatcher formData(MultiValueMap<String, String> expectedMap, boole
193193
* <li>{@link Resource} - content from a file
194194
* <li>{@code byte[]} - other raw content
195195
* </ul>
196-
* <p><strong>Note:</strong> This method uses the Apache Commons File Upload
196+
* <p><strong>Note:</strong> This method uses the Apache Commons FileUpload
197197
* library to parse the multipart data and it must be on the test classpath.
198198
* @param expectedMap the expected multipart values
199199
* @since 5.3

spring-tx/src/main/java/org/springframework/transaction/interceptor/AbstractFallbackTransactionAttributeSource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2021 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.
@@ -163,7 +163,7 @@ protected Object getCacheKey(Method method, @Nullable Class<?> targetClass) {
163163
*/
164164
@Nullable
165165
protected TransactionAttribute computeTransactionAttribute(Method method, @Nullable Class<?> targetClass) {
166-
// Don't allow no-public methods as required.
166+
// Don't allow non-public methods, as configured.
167167
if (allowPublicMethodsOnly() && !Modifier.isPublic(method.getModifiers())) {
168168
return null;
169169
}

spring-web/src/main/java/org/springframework/http/server/reactive/AbstractListenerWriteProcessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ protected void dataReceived(T data) {
254254
* the next item from the upstream, write Publisher.
255255
* <p>The default implementation is a no-op.
256256
* @deprecated originally introduced for Undertow to stop write notifications
257-
* when no data is available, but deprecated as of as of 5.0.6 since constant
257+
* when no data is available, but deprecated as of 5.0.6 since constant
258258
* switching on every requested item causes a significant slowdown.
259259
*/
260260
@Deprecated

spring-web/src/main/java/org/springframework/web/filter/DelegatingFilterProxy.java

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2021 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.
@@ -54,9 +54,9 @@
5454
* of the {@code Filter.init} and {@code Filter.destroy} lifecycle methods
5555
* on the target bean, letting the servlet container manage the filter lifecycle.
5656
*
57-
* <p>As of Spring 3.1, {@code DelegatingFilterProxy} has been updated to optionally accept
58-
* constructor parameters when using Servlet 3.0's instance-based filter registration
59-
* methods, usually in conjunction with Spring 3.1's
57+
* <p>As of Spring 3.1, {@code DelegatingFilterProxy} has been updated to optionally
58+
* accept constructor parameters when using a Servlet container's instance-based filter
59+
* registration methods, usually in conjunction with Spring's
6060
* {@link org.springframework.web.WebApplicationInitializer} SPI. These constructors allow
6161
* for providing the delegate Filter bean directly, or providing the application context
6262
* and bean name to fetch, avoiding the need to look up the application context from the
@@ -100,8 +100,7 @@ public class DelegatingFilterProxy extends GenericFilterBean {
100100

101101

102102
/**
103-
* Create a new {@code DelegatingFilterProxy}. For traditional (pre-Servlet 3.0) use
104-
* in {@code web.xml}.
103+
* Create a new {@code DelegatingFilterProxy}. For traditional use in {@code web.xml}.
105104
* @see #setTargetBeanName(String)
106105
*/
107106
public DelegatingFilterProxy() {
@@ -111,8 +110,7 @@ public DelegatingFilterProxy() {
111110
* Create a new {@code DelegatingFilterProxy} with the given {@link Filter} delegate.
112111
* Bypasses entirely the need for interacting with a Spring application context,
113112
* specifying the {@linkplain #setTargetBeanName target bean name}, etc.
114-
* <p>For use in Servlet 3.0+ environments where instance-based registration of
115-
* filters is supported.
113+
* <p>For use with instance-based registration of filters.
116114
* @param delegate the {@code Filter} instance that this proxy will delegate to and
117115
* manage the lifecycle for (must not be {@code null}).
118116
* @see #doFilter(ServletRequest, ServletResponse, FilterChain)
@@ -130,9 +128,8 @@ public DelegatingFilterProxy(Filter delegate) {
130128
* bean from the Spring {@code WebApplicationContext} found in the {@code ServletContext}
131129
* (either the 'root' application context or the context named by
132130
* {@link #setContextAttribute}).
133-
* <p>For use in Servlet 3.0+ environments where instance-based registration of
134-
* filters is supported.
135-
* <p>The target bean must implement the standard Servlet Filter.
131+
* <p>For use with instance-based registration of filters.
132+
* <p>The target bean must implement the standard Servlet Filter interface.
136133
* @param targetBeanName name of the target filter bean to look up in the Spring
137134
* application context (must not be {@code null}).
138135
* @see #findWebApplicationContext()
@@ -145,8 +142,7 @@ public DelegatingFilterProxy(String targetBeanName) {
145142
/**
146143
* Create a new {@code DelegatingFilterProxy} that will retrieve the named target
147144
* bean from the given Spring {@code WebApplicationContext}.
148-
* <p>For use in Servlet 3.0+ environments where instance-based registration of
149-
* filters is supported.
145+
* <p>For use with instance-based registration of filters.
150146
* <p>The target bean must implement the standard Servlet Filter interface.
151147
* <p>The given {@code WebApplicationContext} may or may not be refreshed when passed
152148
* in. If it has not, and if the context implements {@link ConfigurableApplicationContext},

spring-web/src/main/java/org/springframework/web/filter/OncePerRequestFilter.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,10 @@ public final void doFilter(ServletRequest request, ServletResponse response, Fil
9898
boolean hasAlreadyFilteredAttribute = request.getAttribute(alreadyFilteredAttributeName) != null;
9999

100100
if (skipDispatch(httpRequest) || shouldNotFilter(httpRequest)) {
101-
102101
// Proceed without invoking this filter...
103102
filterChain.doFilter(request, response);
104103
}
105104
else if (hasAlreadyFilteredAttribute) {
106-
107105
if (DispatcherType.ERROR.equals(request.getDispatcherType())) {
108106
doFilterNestedErrorDispatch(httpRequest, httpResponse, filterChain);
109107
return;
@@ -197,7 +195,7 @@ protected boolean shouldNotFilter(HttpServletRequest request) throws ServletExce
197195
* setting up thread locals or to perform final processing at the very end.
198196
* <p>Note that although a filter can be mapped to handle specific dispatcher
199197
* types via {@code web.xml} or in Java through the {@code ServletContext},
200-
* servlet containers may enforce different defaults with regards to
198+
* servlet containers may enforce different defaults with respect to
201199
* dispatcher types. This flag enforces the design intent of the filter.
202200
* <p>The default return value is "true", which means the filter will not be
203201
* invoked during subsequent async dispatches. If "false", the filter will

spring-web/src/main/java/org/springframework/web/server/MediaTypeNotSupportedStatusException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2021 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.
@@ -28,7 +28,7 @@
2828
* @author Rossen Stoyanchev
2929
* @since 5.0
3030
* @deprecated in favor of {@link UnsupportedMediaTypeStatusException},
31-
* with this class never thrown by Spring code and to be removed in 5.3
31+
* with this class never thrown by Spring code and to be removed in 6.0
3232
*/
3333
@Deprecated
3434
@SuppressWarnings("serial")

0 commit comments

Comments
 (0)