Skip to content

Commit dd3262b

Browse files
committed
Polishing (backported from master)
1 parent fdafd38 commit dd3262b

File tree

7 files changed

+41
-36
lines changed

7 files changed

+41
-36
lines changed

spring-aop/src/main/java/org/springframework/aop/DynamicIntroductionAdvice.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 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.
@@ -26,7 +26,7 @@
2626
* <p>Introductions are often <b>mixins</b>, enabling the building of composite
2727
* objects that can achieve many of the goals of multiple inheritance in Java.
2828
*
29-
* <p>Compared to {qlink IntroductionInfo}, this interface allows an advice to
29+
* <p>Compared to {@link IntroductionInfo}, this interface allows an advice to
3030
* implement a range of interfaces that is not necessarily known in advance.
3131
* Thus an {@link IntroductionAdvisor} can be used to specify which interfaces
3232
* will be exposed in an advised object.

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

+11-9
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.
@@ -36,15 +36,16 @@
3636
* Example XML bean definition:
3737
*
3838
* <pre class="code">
39-
* &lt;bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"/&gt;
40-
* &lt;property name="driverClassName" value="${driver}"/&gt;
41-
* &lt;property name="url" value="jdbc:${dbname}"/&gt;
39+
* &lt;bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
40+
* &lt;property name="driverClassName" value="${driver}" /&gt;
41+
* &lt;property name="url" value="jdbc:${dbname}" /&gt;
4242
* &lt;/bean&gt;
4343
* </pre>
4444
*
4545
* Example properties file:
4646
*
47-
* <pre class="code">driver=com.mysql.jdbc.Driver
47+
* <pre class="code">
48+
* driver=com.mysql.jdbc.Driver
4849
* dbname=mysql:mydb</pre>
4950
*
5051
* Annotated bean definitions may take advantage of property replacement using
@@ -56,7 +57,8 @@
5657
* in bean references. Furthermore, placeholder values can also cross-reference
5758
* other placeholders, like:
5859
*
59-
* <pre class="code">rootPath=myrootdir
60+
* <pre class="code">
61+
* rootPath=myrootdir
6062
* subPath=${rootPath}/subdir</pre>
6163
*
6264
* In contrast to {@link PropertyOverrideConfigurer}, subclasses of this type allow
@@ -71,13 +73,13 @@
7173
*
7274
* <p>Default property values can be defined globally for each configurer instance
7375
* via the {@link #setProperties properties} property, or on a property-by-property basis
74-
* using the default value separator which is {@code ":"} by default and
75-
* customizable via {@link #setValueSeparator(String)}.
76+
* using the value separator which is {@code ":"} by default and customizable via
77+
* {@link #setValueSeparator(String)}.
7678
*
7779
* <p>Example XML property with default value:
7880
*
7981
* <pre class="code">
80-
* <property name="url" value="jdbc:${dbname:defaultdb}"/>
82+
* &lt;property name="url" value="jdbc:${dbname:defaultdb}" /&gt;
8183
* </pre>
8284
*
8385
* @author Chris Beams

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

+4-4
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.
@@ -71,12 +71,12 @@
7171
*
7272
* <p>Registered by default when using {@code <context:annotation-config/>} or
7373
* {@code <context:component-scan/>}. Otherwise, may be declared manually as
74-
* with any other BeanFactoryPostProcessor.
74+
* with any other {@link BeanFactoryPostProcessor}.
7575
*
7676
* <p>This post processor is priority-ordered as it is important that any
77-
* {@link Bean} methods declared in {@code @Configuration} classes have
77+
* {@link Bean @Bean} methods declared in {@code @Configuration} classes have
7878
* their corresponding bean definitions registered before any other
79-
* {@link BeanFactoryPostProcessor} executes.
79+
* {@code BeanFactoryPostProcessor} executes.
8080
*
8181
* @author Chris Beams
8282
* @author Juergen Hoeller

spring-context/src/main/java/org/springframework/context/index/CandidateComponentsIndexLoader.java

+3-3
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.
@@ -48,13 +48,13 @@ public final class CandidateComponentsIndexLoader {
4848
public static final String COMPONENTS_RESOURCE_LOCATION = "META-INF/spring.components";
4949

5050
/**
51-
* System property that instructs Spring to ignore the index, i.e.
51+
* System property that instructs Spring to ignore the components index, i.e.
5252
* to always return {@code null} from {@link #loadIndex(ClassLoader)}.
5353
* <p>The default is "false", allowing for regular use of the index. Switching this
5454
* flag to {@code true} fulfills a corner case scenario when an index is partially
5555
* available for some libraries (or use cases) but couldn't be built for the whole
5656
* application. In this case, the application context fallbacks to a regular
57-
* classpath arrangement (i.e. as no index was present at all).
57+
* classpath arrangement (i.e. as though no index were present at all).
5858
*/
5959
public static final String IGNORE_INDEX = "spring.index.ignore";
6060

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

+3-3
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.
@@ -856,8 +856,8 @@ protected void finishBeanFactoryInitialization(ConfigurableListableBeanFactory b
856856
beanFactory.getBean(CONVERSION_SERVICE_BEAN_NAME, ConversionService.class));
857857
}
858858

859-
// Register a default embedded value resolver if no bean post-processor
860-
// (such as a PropertyPlaceholderConfigurer bean) registered any before:
859+
// Register a default embedded value resolver if no BeanFactoryPostProcessor
860+
// (such as a PropertySourcesPlaceholderConfigurer bean) registered any before:
861861
// at this point, primarily for resolution in annotation attribute values.
862862
if (!beanFactory.hasEmbeddedValueResolver()) {
863863
beanFactory.addEmbeddedValueResolver(strVal -> getEnvironment().resolvePlaceholders(strVal));

spring-context/src/main/java/org/springframework/format/annotation/DateTimeFormat.java

+10-7
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.
@@ -36,14 +36,17 @@
3636
*
3737
* <p>For ISO-based formatting, set the {@link #iso} attribute to be the desired {@link ISO} format,
3838
* such as {@link ISO#DATE}. For custom formatting, set the {@link #pattern} attribute to be the
39-
* DateTime pattern, such as {@code yyyy/MM/dd hh:mm:ss a}.
39+
* DateTime pattern, such as {@code "yyyy/MM/dd hh:mm:ss a"}.
4040
*
4141
* <p>Each attribute is mutually exclusive, so only set one attribute per annotation instance
42-
* (the one most convenient one for your formatting needs).
43-
* When the pattern attribute is specified, it takes precedence over both the style and ISO attribute.
44-
* When the {@link #iso} attribute is specified, it takes precedence over the style attribute.
45-
* When no annotation attributes are specified, the default format applied is style-based
46-
* with a style code of 'SS' (short date, short time).
42+
* (the one most convenient for your formatting needs).
43+
*
44+
* <ul>
45+
* <li>When the pattern attribute is specified, it takes precedence over both the style and ISO attribute.</li>
46+
* <li>When the {@link #iso} attribute is specified, it takes precedence over the style attribute.</li>
47+
* <li>When no annotation attributes are specified, the default format applied is style-based
48+
* with a style code of 'SS' (short date, short time).</li>
49+
* </ul>
4750
*
4851
* @author Keith Donald
4952
* @author Juergen Hoeller

spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronizationUtils.java

+8-8
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.
@@ -45,10 +45,10 @@ public abstract class TransactionSynchronizationUtils {
4545

4646

4747
/**
48-
* Check whether the given resource transaction managers refers to the given
48+
* Check whether the given resource transaction manager refers to the given
4949
* (underlying) resource factory.
5050
* @see ResourceTransactionManager#getResourceFactory()
51-
* @see org.springframework.core.InfrastructureProxy#getWrappedObject()
51+
* @see InfrastructureProxy#getWrappedObject()
5252
*/
5353
public static boolean sameResourceFactory(ResourceTransactionManager tm, Object resourceFactory) {
5454
return unwrapResourceIfNecessary(tm.getResourceFactory()).equals(unwrapResourceIfNecessary(resourceFactory));
@@ -57,7 +57,7 @@ public static boolean sameResourceFactory(ResourceTransactionManager tm, Object
5757
/**
5858
* Unwrap the given resource handle if necessary; otherwise return
5959
* the given handle as-is.
60-
* @see org.springframework.core.InfrastructureProxy#getWrappedObject()
60+
* @see InfrastructureProxy#getWrappedObject()
6161
*/
6262
static Object unwrapResourceIfNecessary(Object resource) {
6363
Assert.notNull(resource, "Resource must not be null");
@@ -106,8 +106,8 @@ public static void triggerBeforeCompletion() {
106106
try {
107107
synchronization.beforeCompletion();
108108
}
109-
catch (Throwable tsex) {
110-
logger.error("TransactionSynchronization.beforeCompletion threw exception", tsex);
109+
catch (Throwable ex) {
110+
logger.error("TransactionSynchronization.beforeCompletion threw exception", ex);
111111
}
112112
}
113113
}
@@ -170,8 +170,8 @@ public static void invokeAfterCompletion(@Nullable List<TransactionSynchronizati
170170
try {
171171
synchronization.afterCompletion(completionStatus);
172172
}
173-
catch (Throwable tsex) {
174-
logger.error("TransactionSynchronization.afterCompletion threw exception", tsex);
173+
catch (Throwable ex) {
174+
logger.error("TransactionSynchronization.afterCompletion threw exception", ex);
175175
}
176176
}
177177
}

0 commit comments

Comments
 (0)