Skip to content

Commit a94c12f

Browse files
committed
Polishing
1 parent 2b5434e commit a94c12f

File tree

10 files changed

+103
-103
lines changed

10 files changed

+103
-103
lines changed

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 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.
@@ -433,7 +433,7 @@ public String getScope() {
433433
*/
434434
@Override
435435
public boolean isSingleton() {
436-
return SCOPE_SINGLETON.equals(scope) || SCOPE_DEFAULT.equals(scope);
436+
return SCOPE_SINGLETON.equals(this.scope) || SCOPE_DEFAULT.equals(this.scope);
437437
}
438438

439439
/**
@@ -443,7 +443,7 @@ public boolean isSingleton() {
443443
*/
444444
@Override
445445
public boolean isPrototype() {
446-
return SCOPE_PROTOTYPE.equals(scope);
446+
return SCOPE_PROTOTYPE.equals(this.scope);
447447
}
448448

449449
/**
@@ -625,7 +625,7 @@ public void addQualifier(AutowireCandidateQualifier qualifier) {
625625
* Return whether this bean has the specified qualifier.
626626
*/
627627
public boolean hasQualifier(String typeName) {
628-
return this.qualifiers.keySet().contains(typeName);
628+
return this.qualifiers.containsKey(typeName);
629629
}
630630

631631
/**
@@ -778,15 +778,15 @@ public void setMethodOverrides(MethodOverrides methodOverrides) {
778778
/**
779779
* Return information about methods to be overridden by the IoC
780780
* container. This will be empty if there are no method overrides.
781-
* Never returns {@code null}.
781+
* <p>Never returns {@code null}.
782782
*/
783783
public MethodOverrides getMethodOverrides() {
784784
return this.methodOverrides;
785785
}
786786

787787
/**
788-
* Set the name of the initializer method. The default is {@code null}
789-
* in which case there is no initializer method.
788+
* Set the name of the initializer method.
789+
* <p>The default is {@code null} in which case there is no initializer method.
790790
*/
791791
public void setInitMethodName(String initMethodName) {
792792
this.initMethodName = initMethodName;
@@ -801,7 +801,7 @@ public String getInitMethodName() {
801801

802802
/**
803803
* Specify whether or not the configured init method is the default.
804-
* Default value is {@code false}.
804+
* <p>The default value is {@code false}.
805805
* @see #setInitMethodName
806806
*/
807807
public void setEnforceInitMethod(boolean enforceInitMethod) {
@@ -817,8 +817,8 @@ public boolean isEnforceInitMethod() {
817817
}
818818

819819
/**
820-
* Set the name of the destroy method. The default is {@code null}
821-
* in which case there is no destroy method.
820+
* Set the name of the destroy method.
821+
* <p>The default is {@code null} in which case there is no destroy method.
822822
*/
823823
public void setDestroyMethodName(String destroyMethodName) {
824824
this.destroyMethodName = destroyMethodName;
@@ -833,7 +833,7 @@ public String getDestroyMethodName() {
833833

834834
/**
835835
* Specify whether or not the configured destroy method is the default.
836-
* Default value is {@code false}.
836+
* <p>The default value is {@code false}.
837837
* @see #setDestroyMethodName
838838
*/
839839
public void setEnforceDestroyMethod(boolean enforceDestroyMethod) {

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2013 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.
@@ -58,7 +58,6 @@ public interface ImportBeanDefinitionRegistrar {
5858
* @param importingClassMetadata annotation metadata of the importing class
5959
* @param registry current bean definition registry
6060
*/
61-
public void registerBeanDefinitions(
62-
AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry);
61+
void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry);
6362

6463
}

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,23 @@
2020

2121
/**
2222
* Interface to be implemented by types that determine which @{@link Configuration}
23-
* class(es) should be imported based on a given selection criteria, usually one or more
24-
* annotation attributes.
23+
* class(es) should be imported based on a given selection criteria, usually one or
24+
* more annotation attributes.
2525
*
2626
* <p>An {@link ImportSelector} may implement any of the following
27-
* {@link org.springframework.beans.factory.Aware Aware} interfaces, and their respective
28-
* methods will be called prior to {@link #selectImports}:
27+
* {@link org.springframework.beans.factory.Aware Aware} interfaces,
28+
* and their respective methods will be called prior to {@link #selectImports}:
2929
* <ul>
3030
* <li>{@link org.springframework.context.EnvironmentAware EnvironmentAware}</li>
3131
* <li>{@link org.springframework.beans.factory.BeanFactoryAware BeanFactoryAware}</li>
3232
* <li>{@link org.springframework.beans.factory.BeanClassLoaderAware BeanClassLoaderAware}</li>
3333
* <li>{@link org.springframework.context.ResourceLoaderAware ResourceLoaderAware}</li>
3434
* </ul>
3535
*
36-
* <p>ImportSelectors are usually processed in the same way as regular {@code @Import}
37-
* annotations, however, it is also possible to defer selection of imports until all
38-
* {@code @Configuration} classes have been processed (see {@link DeferredImportSelector}
39-
* for details).
36+
* <p>{@code ImportSelector} implementations are usually processed in the same way
37+
* as regular {@code @Import} annotations, however, it is also possible to defer
38+
* selection of imports until all {@code @Configuration} classes have been processed
39+
* (see {@link DeferredImportSelector} for details).
4040
*
4141
* @author Chris Beams
4242
* @since 3.1

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,24 +91,24 @@
9191
* to detect special beans defined in its internal bean factory:
9292
* Therefore, this class automatically registers
9393
* {@link org.springframework.beans.factory.config.BeanFactoryPostProcessor BeanFactoryPostProcessors},
94-
* {@link org.springframework.beans.factory.config.BeanPostProcessor BeanPostProcessors}
94+
* {@link org.springframework.beans.factory.config.BeanPostProcessor BeanPostProcessors},
9595
* and {@link org.springframework.context.ApplicationListener ApplicationListeners}
9696
* which are defined as beans in the context.
9797
*
9898
* <p>A {@link org.springframework.context.MessageSource} may also be supplied
9999
* as a bean in the context, with the name "messageSource"; otherwise, message
100100
* resolution is delegated to the parent context. Furthermore, a multicaster
101-
* for application events can be supplied as "applicationEventMulticaster" bean
101+
* for application events can be supplied as an "applicationEventMulticaster" bean
102102
* of type {@link org.springframework.context.event.ApplicationEventMulticaster}
103103
* in the context; otherwise, a default multicaster of type
104104
* {@link org.springframework.context.event.SimpleApplicationEventMulticaster} will be used.
105105
*
106-
* <p>Implements resource loading through extending
106+
* <p>Implements resource loading by extending
107107
* {@link org.springframework.core.io.DefaultResourceLoader}.
108108
* Consequently treats non-URL resource paths as class path resources
109109
* (supporting full class path resource names that include the package path,
110110
* e.g. "mypackage/myresource.dat"), unless the {@link #getResourceByPath}
111-
* method is overwritten in a subclass.
111+
* method is overridden in a subclass.
112112
*
113113
* @author Rod Johnson
114114
* @author Juergen Hoeller
@@ -381,7 +381,7 @@ protected void publishEvent(Object event, ResolvableType eventType) {
381381
else {
382382
applicationEvent = new PayloadApplicationEvent<Object>(this, event);
383383
if (eventType == null) {
384-
eventType = ((PayloadApplicationEvent) applicationEvent).getResolvableType();
384+
eventType = ((PayloadApplicationEvent<?>) applicationEvent).getResolvableType();
385385
}
386386
}
387387

@@ -695,7 +695,7 @@ protected void invokeBeanFactoryPostProcessors(ConfigurableListableBeanFactory b
695695
}
696696

697697
/**
698-
* Instantiate and invoke all registered BeanPostProcessor beans,
698+
* Instantiate and register all BeanPostProcessor beans,
699699
* respecting explicit order if given.
700700
* <p>Must be called before any instantiation of application beans.
701701
*/

spring-core/src/main/java/org/springframework/util/ObjectUtils.java

Lines changed: 21 additions & 21 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.
@@ -606,7 +606,7 @@ public static String getDisplayString(Object obj) {
606606

607607
/**
608608
* Determine the class name for the given object.
609-
* <p>Returns {@code "null"} if {@code obj} is {@code null}.
609+
* <p>Returns a {@code "null"} String if {@code obj} is {@code null}.
610610
* @param obj the object to introspect (may be {@code null})
611611
* @return the corresponding class name
612612
*/
@@ -617,7 +617,7 @@ public static String nullSafeClassName(Object obj) {
617617
/**
618618
* Return a String representation of the specified Object.
619619
* <p>Builds a String representation of the contents in case of an array.
620-
* Returns {@code "null"} if {@code obj} is {@code null}.
620+
* Returns a {@code "null"} String if {@code obj} is {@code null}.
621621
* @param obj the object to build a String representation for
622622
* @return a String representation of {@code obj}
623623
*/
@@ -663,8 +663,8 @@ public static String nullSafeToString(Object obj) {
663663
* Return a String representation of the contents of the specified array.
664664
* <p>The String representation consists of a list of the array's elements,
665665
* enclosed in curly braces ({@code "{}"}). Adjacent elements are separated
666-
* by the characters {@code ", "} (a comma followed by a space). Returns
667-
* {@code "null"} if {@code array} is {@code null}.
666+
* by the characters {@code ", "} (a comma followed by a space).
667+
* Returns a {@code "null"} String if {@code array} is {@code null}.
668668
* @param array the array to build a String representation for
669669
* @return a String representation of {@code array}
670670
*/
@@ -694,8 +694,8 @@ public static String nullSafeToString(Object[] array) {
694694
* Return a String representation of the contents of the specified array.
695695
* <p>The String representation consists of a list of the array's elements,
696696
* enclosed in curly braces ({@code "{}"}). Adjacent elements are separated
697-
* by the characters {@code ", "} (a comma followed by a space). Returns
698-
* {@code "null"} if {@code array} is {@code null}.
697+
* by the characters {@code ", "} (a comma followed by a space).
698+
* Returns a {@code "null"} String if {@code array} is {@code null}.
699699
* @param array the array to build a String representation for
700700
* @return a String representation of {@code array}
701701
*/
@@ -726,8 +726,8 @@ public static String nullSafeToString(boolean[] array) {
726726
* Return a String representation of the contents of the specified array.
727727
* <p>The String representation consists of a list of the array's elements,
728728
* enclosed in curly braces ({@code "{}"}). Adjacent elements are separated
729-
* by the characters {@code ", "} (a comma followed by a space). Returns
730-
* {@code "null"} if {@code array} is {@code null}.
729+
* by the characters {@code ", "} (a comma followed by a space).
730+
* Returns a {@code "null"} String if {@code array} is {@code null}.
731731
* @param array the array to build a String representation for
732732
* @return a String representation of {@code array}
733733
*/
@@ -757,8 +757,8 @@ public static String nullSafeToString(byte[] array) {
757757
* Return a String representation of the contents of the specified array.
758758
* <p>The String representation consists of a list of the array's elements,
759759
* enclosed in curly braces ({@code "{}"}). Adjacent elements are separated
760-
* by the characters {@code ", "} (a comma followed by a space). Returns
761-
* {@code "null"} if {@code array} is {@code null}.
760+
* by the characters {@code ", "} (a comma followed by a space).
761+
* Returns a {@code "null"} String if {@code array} is {@code null}.
762762
* @param array the array to build a String representation for
763763
* @return a String representation of {@code array}
764764
*/
@@ -788,8 +788,8 @@ public static String nullSafeToString(char[] array) {
788788
* Return a String representation of the contents of the specified array.
789789
* <p>The String representation consists of a list of the array's elements,
790790
* enclosed in curly braces ({@code "{}"}). Adjacent elements are separated
791-
* by the characters {@code ", "} (a comma followed by a space). Returns
792-
* {@code "null"} if {@code array} is {@code null}.
791+
* by the characters {@code ", "} (a comma followed by a space).
792+
* Returns a {@code "null"} String if {@code array} is {@code null}.
793793
* @param array the array to build a String representation for
794794
* @return a String representation of {@code array}
795795
*/
@@ -820,8 +820,8 @@ public static String nullSafeToString(double[] array) {
820820
* Return a String representation of the contents of the specified array.
821821
* <p>The String representation consists of a list of the array's elements,
822822
* enclosed in curly braces ({@code "{}"}). Adjacent elements are separated
823-
* by the characters {@code ", "} (a comma followed by a space). Returns
824-
* {@code "null"} if {@code array} is {@code null}.
823+
* by the characters {@code ", "} (a comma followed by a space).
824+
* Returns a {@code "null"} String if {@code array} is {@code null}.
825825
* @param array the array to build a String representation for
826826
* @return a String representation of {@code array}
827827
*/
@@ -852,8 +852,8 @@ public static String nullSafeToString(float[] array) {
852852
* Return a String representation of the contents of the specified array.
853853
* <p>The String representation consists of a list of the array's elements,
854854
* enclosed in curly braces ({@code "{}"}). Adjacent elements are separated
855-
* by the characters {@code ", "} (a comma followed by a space). Returns
856-
* {@code "null"} if {@code array} is {@code null}.
855+
* by the characters {@code ", "} (a comma followed by a space).
856+
* Returns a {@code "null"} String if {@code array} is {@code null}.
857857
* @param array the array to build a String representation for
858858
* @return a String representation of {@code array}
859859
*/
@@ -883,8 +883,8 @@ public static String nullSafeToString(int[] array) {
883883
* Return a String representation of the contents of the specified array.
884884
* <p>The String representation consists of a list of the array's elements,
885885
* enclosed in curly braces ({@code "{}"}). Adjacent elements are separated
886-
* by the characters {@code ", "} (a comma followed by a space). Returns
887-
* {@code "null"} if {@code array} is {@code null}.
886+
* by the characters {@code ", "} (a comma followed by a space).
887+
* Returns a {@code "null"} String if {@code array} is {@code null}.
888888
* @param array the array to build a String representation for
889889
* @return a String representation of {@code array}
890890
*/
@@ -914,8 +914,8 @@ public static String nullSafeToString(long[] array) {
914914
* Return a String representation of the contents of the specified array.
915915
* <p>The String representation consists of a list of the array's elements,
916916
* enclosed in curly braces ({@code "{}"}). Adjacent elements are separated
917-
* by the characters {@code ", "} (a comma followed by a space). Returns
918-
* {@code "null"} if {@code array} is {@code null}.
917+
* by the characters {@code ", "} (a comma followed by a space).
918+
* Returns a {@code "null"} String if {@code array} is {@code null}.
919919
* @param array the array to build a String representation for
920920
* @return a String representation of {@code array}
921921
*/

spring-messaging/src/main/java/org/springframework/messaging/simp/config/AbstractMessageBrokerConfiguration.java

Lines changed: 8 additions & 6 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.
@@ -65,18 +65,20 @@
6565
* protocols such as STOMP.
6666
*
6767
* <p>{@link #clientInboundChannel()} and {@link #clientOutboundChannel()} deliver
68-
* messages to and from remote clients to several message handlers such as
68+
* messages to and from remote clients to several message handlers such as the
69+
* following.
6970
* <ul>
7071
* <li>{@link #simpAnnotationMethodMessageHandler()}</li>
7172
* <li>{@link #simpleBrokerMessageHandler()}</li>
7273
* <li>{@link #stompBrokerRelayMessageHandler()}</li>
7374
* <li>{@link #userDestinationMessageHandler()}</li>
7475
* </ul>
75-
* while {@link #brokerChannel()} delivers messages from within the application to the
76+
*
77+
* <p>{@link #brokerChannel()} delivers messages from within the application to the
7678
* the respective message handlers. {@link #brokerMessagingTemplate()} can be injected
7779
* into any application component to send messages.
7880
*
79-
* <p>Subclasses are responsible for the part of the configuration that feed messages
81+
* <p>Subclasses are responsible for the parts of the configuration that feed messages
8082
* to and from the client inbound/outbound channels (e.g. STOMP over WebSocket).
8183
*
8284
* @author Rossen Stoyanchev
@@ -387,7 +389,7 @@ protected MappingJackson2MessageConverter createJacksonConverter() {
387389
* Override this method to add custom message converters.
388390
* @param messageConverters the list to add converters to, initially empty
389391
* @return {@code true} if default message converters should be added to list,
390-
* {@code false} if no more converters should be added.
392+
* {@code false} if no more converters should be added
391393
*/
392394
protected boolean configureMessageConverters(List<MessageConverter> messageConverters) {
393395
return true;
@@ -410,7 +412,7 @@ public SimpUserRegistry userRegistry() {
410412
}
411413

412414
/**
413-
* Create the user registry that provides access to the local users.
415+
* Create the user registry that provides access to local users.
414416
*/
415417
protected abstract SimpUserRegistry createLocalUserRegistry();
416418

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

Lines changed: 2 additions & 2 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.
@@ -258,7 +258,7 @@ private String unescape(String inString) {
258258
if (index + 1 >= inString.length()) {
259259
throw new StompConversionException("Illegal escape sequence at index " + index + ": " + inString);
260260
}
261-
Character c = inString.charAt(index + 1);
261+
char c = inString.charAt(index + 1);
262262
if (c == 'r') {
263263
sb.append('\r');
264264
}

0 commit comments

Comments
 (0)