Skip to content

Commit 82f1340

Browse files
committed
Polishing
1 parent a3fb52e commit 82f1340

File tree

20 files changed

+87
-91
lines changed

20 files changed

+87
-91
lines changed

spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassParser.java

Lines changed: 6 additions & 6 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-2019 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.
@@ -85,9 +85,9 @@
8585
* another using the {@link Import} annotation).
8686
*
8787
* <p>This class helps separate the concern of parsing the structure of a Configuration
88-
* class from the concern of registering BeanDefinition objects based on the
89-
* content of that model (with the exception of {@code @ComponentScan} annotations which
90-
* need to be registered immediately).
88+
* class from the concern of registering BeanDefinition objects based on the content of
89+
* that model (with the exception of {@code @ComponentScan} annotations which need to be
90+
* registered immediately).
9191
*
9292
* <p>This ASM-based implementation avoids reflection and eager class loading in order to
9393
* interoperate effectively with lazy class loading in a Spring ApplicationContext.
@@ -814,7 +814,7 @@ public boolean isAssignable(Class<?> clazz) throws IOException {
814814
return new AssignableTypeFilter(clazz).match((MetadataReader) this.source, metadataReaderFactory);
815815
}
816816

817-
public ConfigurationClass asConfigClass(ConfigurationClass importedBy) throws IOException {
817+
public ConfigurationClass asConfigClass(ConfigurationClass importedBy) {
818818
if (this.source instanceof Class) {
819819
return new ConfigurationClass((Class<?>) this.source, importedBy);
820820
}
@@ -882,7 +882,7 @@ public Set<SourceClass> getInterfaces() throws IOException {
882882
return result;
883883
}
884884

885-
public Set<SourceClass> getAnnotations() throws IOException {
885+
public Set<SourceClass> getAnnotations() {
886886
Set<SourceClass> result = new LinkedHashSet<SourceClass>();
887887
for (String className : this.metadata.getAnnotationTypes()) {
888888
try {

spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.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-2019 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.
@@ -428,7 +428,7 @@ public PropertyValues postProcessPropertyValues(
428428
}
429429

430430
@Override
431-
public Object postProcessBeforeInitialization(Object bean, String beanName) {
431+
public Object postProcessBeforeInitialization(Object bean, String beanName) {
432432
if (bean instanceof ImportAware) {
433433
ImportRegistry ir = this.beanFactory.getBean(IMPORT_REGISTRY_BEAN_NAME, ImportRegistry.class);
434434
AnnotationMetadata importingClass = ir.getImportingClassFor(bean.getClass().getSuperclass().getName());

spring-context/src/main/java/org/springframework/context/event/AbstractApplicationEventMulticaster.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-2019 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.
@@ -257,7 +257,7 @@ private Collection<ApplicationListener<?>> retrieveApplicationListeners(
257257
* type before trying to instantiate it.
258258
* <p>If this method returns {@code true} for a given listener as a first pass,
259259
* the listener instance will get retrieved and fully evaluated through a
260-
* {@link #supportsEvent(ApplicationListener,ResolvableType, Class)} call afterwards.
260+
* {@link #supportsEvent(ApplicationListener, ResolvableType, Class)} call afterwards.
261261
* @param listenerType the listener's type as determined by the BeanFactory
262262
* @param eventType the event type to check
263263
* @return whether the given listener should be included in the candidates

spring-context/src/main/java/org/springframework/context/support/AbstractApplicationContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1214,7 +1214,7 @@ public Map<String, Object> getBeansWithAnnotation(Class<? extends Annotation> an
12141214

12151215
@Override
12161216
public <A extends Annotation> A findAnnotationOnBean(String beanName, Class<A> annotationType)
1217-
throws NoSuchBeanDefinitionException{
1217+
throws NoSuchBeanDefinitionException {
12181218

12191219
assertBeanFactoryActive();
12201220
return getBeanFactory().findAnnotationOnBean(beanName, annotationType);

spring-context/src/main/java/org/springframework/context/support/ResourceBundleMessageSource.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-2019 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.
@@ -292,7 +292,7 @@ protected String getStringOrNull(ResourceBundle bundle, String key) {
292292
try {
293293
return bundle.getString(key);
294294
}
295-
catch (MissingResourceException ex){
295+
catch (MissingResourceException ex) {
296296
// Assume key not found for some other reason
297297
// -> do NOT throw the exception to allow for checking parent message source.
298298
}

spring-context/src/main/java/org/springframework/context/support/SimpleThreadScope.java

Lines changed: 7 additions & 8 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-2019 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.
@@ -35,14 +35,13 @@
3535
* or through a {@link org.springframework.beans.factory.config.CustomScopeConfigurer} bean.
3636
*
3737
* <p>{@code SimpleThreadScope} <em>does not clean up any objects</em> associated with it.
38-
* As such, it is typically preferable to use
39-
* {@link org.springframework.web.context.request.RequestScope RequestScope}
40-
* in web environments.
38+
* It is therefore typically preferable to use a request-bound scope implementation such
39+
* as {@code org.springframework.web.context.request.RequestScope} in web environments,
40+
* implementing the full lifecycle for scoped attributes (including reliable destruction).
4141
*
42-
* <p>For an implementation of a thread-based {@code Scope} with support for
43-
* destruction callbacks, refer to the
44-
* <a href="http://www.springbyexample.org/examples/custom-thread-scope-module.html">
45-
* Spring by Example Custom Thread Scope Module</a>.
42+
* <p>For an implementation of a thread-based {@code Scope} with support for destruction
43+
* callbacks, refer to
44+
* <a href="http://www.springbyexample.org/examples/custom-thread-scope-module.html">Spring by Example</a>.
4645
*
4746
* <p>Thanks to Eugene Kuleshov for submitting the original prototype for a thread scope!
4847
*

spring-core/src/main/java/org/springframework/util/ClassUtils.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-2019 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,7 +34,7 @@
3434
import java.util.Set;
3535

3636
/**
37-
* Miscellaneous class utility methods.
37+
* Miscellaneous {@code java.lang.Class} utility methods.
3838
* Mainly for internal use within the framework.
3939
*
4040
* @author Juergen Hoeller

spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompSession.java

Lines changed: 12 additions & 12 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-2019 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.
@@ -17,8 +17,8 @@
1717
package org.springframework.messaging.simp.stomp;
1818

1919
/**
20-
* Represents a STOMP session with operations to send messages, create
21-
* subscriptions and receive messages on those subscriptions.
20+
* Represents a STOMP session with operations to send messages,
21+
* create subscriptions and receive messages on those subscriptions.
2222
*
2323
* @author Rossen Stoyanchev
2424
* @since 4.2
@@ -37,10 +37,10 @@ public interface StompSession {
3737

3838
/**
3939
* When enabled, a receipt header is automatically added to future
40-
* {@code send} and {@code subscribe} operations on this session, which causes
41-
* the server to return a RECEIPT. An application can then use the
42-
* {@link StompSession.Receiptable
43-
* Receiptable} returned from the operation to track the receipt.
40+
* {@code send} and {@code subscribe} operations on this session, which
41+
* causes the server to return a RECEIPT. An application can then use
42+
* the {@link StompSession.Receiptable Receiptable} returned from the
43+
* operation to track the receipt.
4444
* <p>A receipt header can also be added manually through the overloaded
4545
* methods that accept {@code StompHeaders}.
4646
*/
@@ -57,11 +57,11 @@ public interface StompSession {
5757
Receiptable send(String destination, Object payload);
5858

5959
/**
60-
* An overloaded version of {@link #send(String, Object)} that accepts
61-
* full {@link StompHeaders} instead of a destination. The headers must
60+
* An overloaded version of {@link #send(String, Object)} with full
61+
* {@link StompHeaders} instead of just a destination. The headers must
6262
* contain a destination and may also have other headers such as
63-
* "content-type" or custom headers for the broker to propagate to subscribers,
64-
* or broker-specific, non-standard headers..
63+
* "content-type" or custom headers for the broker to propagate to
64+
* subscribers, or broker-specific, non-standard headers.
6565
* @param headers the message headers
6666
* @param payload the message payload
6767
* @return a Receiptable for tracking receipts
@@ -79,7 +79,7 @@ public interface StompSession {
7979

8080
/**
8181
* An overloaded version of {@link #subscribe(String, StompFrameHandler)}
82-
* that accepts full {@link StompHeaders} rather instead of a destination.
82+
* with full {@link StompHeaders} instead of just a destination.
8383
* @param headers the headers for the subscribe message frame
8484
* @param handler the handler for received messages
8585
* @return a handle to use to unsubscribe and/or track receipts

spring-web/src/main/java/org/springframework/http/HttpHeaders.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-2019 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.
@@ -1315,7 +1315,7 @@ public String toString() {
13151315

13161316

13171317
/**
1318-
* Return a {@code HttpHeaders} object that can only be read, not written to.
1318+
* Return an {@code HttpHeaders} object that can only be read, not written to.
13191319
*/
13201320
public static HttpHeaders readOnlyHttpHeaders(HttpHeaders headers) {
13211321
Assert.notNull(headers, "HttpHeaders must not be null");

spring-webmvc/src/main/java/org/springframework/web/servlet/DispatcherServlet.java

Lines changed: 5 additions & 5 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-2019 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.
@@ -1095,8 +1095,8 @@ protected HttpServletRequest checkMultipart(HttpServletRequest request) throws M
10951095
logger.debug("Request is already a MultipartHttpServletRequest - if not in a forward, " +
10961096
"this typically results from an additional MultipartFilter in web.xml");
10971097
}
1098-
else if (hasMultipartException(request) ) {
1099-
logger.debug("Multipart resolution failed for current request before - " +
1098+
else if (hasMultipartException(request)) {
1099+
logger.debug("Multipart resolution previously failed for current request - " +
11001100
"skipping re-resolution for undisturbed error rendering");
11011101
}
11021102
else {
@@ -1345,7 +1345,7 @@ private void triggerAfterCompletion(HttpServletRequest request, HttpServletRespo
13451345
* @param attributesSnapshot the snapshot of the request attributes before the include
13461346
*/
13471347
@SuppressWarnings("unchecked")
1348-
private void restoreAttributesAfterInclude(HttpServletRequest request, Map<?,?> attributesSnapshot) {
1348+
private void restoreAttributesAfterInclude(HttpServletRequest request, Map<?, ?> attributesSnapshot) {
13491349
// Need to copy into separate Collection here, to avoid side effects
13501350
// on the Enumeration when removing attributes.
13511351
Set<String> attrsToCheck = new HashSet<String>();
@@ -1364,7 +1364,7 @@ private void restoreAttributesAfterInclude(HttpServletRequest request, Map<?,?>
13641364
// or removing the attribute, respectively, if appropriate.
13651365
for (String attrName : attrsToCheck) {
13661366
Object attrValue = attributesSnapshot.get(attrName);
1367-
if (attrValue == null){
1367+
if (attrValue == null) {
13681368
request.removeAttribute(attrName);
13691369
}
13701370
else if (attrValue != request.getAttribute(attrName)) {

0 commit comments

Comments
 (0)