Skip to content

Commit a9a1f78

Browse files
committed
Polishing
1 parent 65d52a4 commit a9a1f78

File tree

22 files changed

+100
-102
lines changed

22 files changed

+100
-102
lines changed

gradle/publish-maven.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ def customizePom(pom, gradleProject) {
2929
}
3030
licenses {
3131
license {
32-
name "The Apache Software License, Version 2.0"
33-
url "http://www.apache.org/licenses/LICENSE-2.0.txt"
32+
name "Apache License, Version 2.0"
33+
url "http://www.apache.org/licenses/LICENSE-2.0"
3434
distribution "repo"
3535
}
3636
}

spring-context/src/main/java/org/springframework/cache/config/CacheNamespaceHandler.java

Lines changed: 7 additions & 4 deletions
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-2017 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.
@@ -39,10 +39,11 @@ public class CacheNamespaceHandler extends NamespaceHandlerSupport {
3939

4040
static final String DEFAULT_CACHE_MANAGER_BEAN_NAME = "cacheManager";
4141

42+
4243
static String extractCacheManager(Element element) {
43-
return (element.hasAttribute(CacheNamespaceHandler.CACHE_MANAGER_ATTRIBUTE) ? element
44-
.getAttribute(CacheNamespaceHandler.CACHE_MANAGER_ATTRIBUTE)
45-
: CacheNamespaceHandler.DEFAULT_CACHE_MANAGER_BEAN_NAME);
44+
return (element.hasAttribute(CacheNamespaceHandler.CACHE_MANAGER_ATTRIBUTE) ?
45+
element.getAttribute(CacheNamespaceHandler.CACHE_MANAGER_ATTRIBUTE) :
46+
CacheNamespaceHandler.DEFAULT_CACHE_MANAGER_BEAN_NAME);
4647
}
4748

4849
static BeanDefinition parseKeyGenerator(Element element, BeanDefinition def) {
@@ -53,9 +54,11 @@ static BeanDefinition parseKeyGenerator(Element element, BeanDefinition def) {
5354
return def;
5455
}
5556

57+
5658
@Override
5759
public void init() {
5860
registerBeanDefinitionParser("annotation-driven", new AnnotationDrivenCacheBeanDefinitionParser());
5961
registerBeanDefinitionParser("advice", new CacheAdviceParser());
6062
}
63+
6164
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@
390390

391391
/**
392392
* Explicitly specify the name of the Spring bean definition associated
393-
* with this Configuration class. If left unspecified (the common case),
393+
* with this Configuration class. If left unspecified (the common case),
394394
* a bean name will be automatically generated.
395395
* <p>The custom name applies only if the Configuration class is picked up via
396396
* component scanning or supplied directly to a {@link AnnotationConfigApplicationContext}.

spring-context/src/main/java/org/springframework/context/event/AbstractApplicationEventMulticaster.java

Lines changed: 3 additions & 3 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-2017 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.
@@ -256,8 +256,8 @@ private Collection<ApplicationListener<?>> retrieveApplicationListeners(
256256
* for the given event type
257257
*/
258258
protected boolean supportsEvent(Class<?> listenerType, ResolvableType eventType) {
259-
if (GenericApplicationListener.class.isAssignableFrom(listenerType)
260-
|| SmartApplicationListener.class.isAssignableFrom(listenerType)) {
259+
if (GenericApplicationListener.class.isAssignableFrom(listenerType) ||
260+
SmartApplicationListener.class.isAssignableFrom(listenerType)) {
261261
return true;
262262
}
263263
ResolvableType declaredEventType = GenericApplicationListenerAdapter.resolveDeclaredEventType(listenerType);

spring-context/src/main/java/org/springframework/context/event/ApplicationEventMulticaster.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2017 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,6 +79,7 @@ public interface ApplicationEventMulticaster {
7979
* based on the {@code event} instance.
8080
* @param event the event to multicast
8181
* @param eventType the type of event (can be null)
82+
* @since 4.2
8283
*/
8384
void multicastEvent(ApplicationEvent event, ResolvableType eventType);
8485

spring-context/src/main/java/org/springframework/context/event/EventListenerMethodProcessor.java

Lines changed: 2 additions & 2 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-2017 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.
@@ -145,7 +145,7 @@ public EventListener inspect(Method method) {
145145
if (CollectionUtils.isEmpty(annotatedMethods)) {
146146
this.nonAnnotatedClasses.add(targetType);
147147
if (logger.isTraceEnabled()) {
148-
logger.trace("No @EventListener annotations found on bean class: " + targetType);
148+
logger.trace("No @EventListener annotations found on bean class: " + targetType.getName());
149149
}
150150
}
151151
else {

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

Lines changed: 5 additions & 5 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-2017 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,10 +23,10 @@
2323
import java.lang.annotation.Target;
2424

2525
/**
26-
* Declares that a field should be formatted as a date time.
26+
* Declares that a field or method parameter should be formatted as a date or time.
2727
*
2828
* <p>Supports formatting by style pattern, ISO date time pattern, or custom format pattern string.
29-
* Can be applied to {@code java.util.Date}, {@code java.util.Calendar}, {@code java.long.Long},
29+
* Can be applied to {@code java.util.Date}, {@code java.util.Calendar}, {@code java.lang.Long},
3030
* Joda-Time value types; and as of Spring 4 and JDK 8, to JSR-310 <code>java.time</code> types too.
3131
*
3232
* <p>For style-based formatting, set the {@link #style} attribute to be the style pattern code.
@@ -35,7 +35,7 @@
3535
* A date or time may be omitted by specifying the style character '-'.
3636
*
3737
* <p>For ISO-based formatting, set the {@link #iso} attribute to be the desired {@link ISO} format,
38-
* such as {@link ISO#DATE}. For custom formatting, set the {@link #pattern()} attribute to be the
38+
* such as {@link ISO#DATE}. For custom formatting, set the {@link #pattern} attribute to be the
3939
* 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
@@ -64,7 +64,7 @@
6464

6565
/**
6666
* The ISO pattern to use to format the field.
67-
* The possible ISO patterns are defined in the {@link ISO} enum.
67+
* <p>The possible ISO patterns are defined in the {@link ISO} enum.
6868
* <p>Defaults to {@link ISO#NONE}, indicating this attribute should be ignored.
6969
* Set this attribute when you wish to format your field in accordance with an ISO format.
7070
*/

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2017 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
import java.lang.annotation.Target;
2424

2525
/**
26-
* Declares that a field should be formatted as a number.
26+
* Declares that a field or method parameter should be formatted as a number.
2727
*
2828
* <p>Supports formatting by style or custom pattern string.
2929
* Can be applied to any JDK {@code java.lang.Number} type.
@@ -37,7 +37,7 @@
3737
* When the {@link #pattern} attribute is specified, it takes precedence over
3838
* the {@link #style} attribute. When no annotation attributes are specified,
3939
* the default format applied is style-based for either number of currency,
40-
* depending on the annotated field type.
40+
* depending on the annotated field or method parameter type.
4141
*
4242
* @author Keith Donald
4343
* @author Juergen Hoeller
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
/**
22
* Spring's repackaging of
3-
* <a href="http://asm.ow2.org">org.objectweb.asm 5.0</a>
3+
* <a href="http://asm.ow2.org">ASM</a>
44
* (for internal use only).
55
*
66
* <p>This repackaging technique avoids any potential conflicts with
77
* dependencies on ASM at the application level or from third-party
88
* libraries and frameworks.
99
*
1010
* <p>As this repackaging happens at the class file level, sources
11-
* and javadocs are not available here. See the original ObjectWeb
12-
* <a href="http://asm.ow2.org/asm50/javadoc/user">ASM 5.0 javadocs</a>
13-
* for details when working with these classes.
11+
* and javadocs are not available here.
1412
*/
1513
package org.springframework.asm;
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
/**
22
* Spring's repackaging of
3-
* <a href="http://cglib.sourceforge.net">net.sf.cglib 3.2</a>
3+
* <a href="http://cglib.sourceforge.net">CGLIB</a>
44
* (for internal use only).
55
*
66
* <p>This repackaging technique avoids any potential conflicts with
77
* dependencies on CGLIB at the application level or from third-party
88
* libraries and frameworks.
99
*
1010
* <p>As this repackaging happens at the class file level, sources
11-
* and javadocs are not available here. See the original
12-
* <a href="http://cglib.sourceforge.net/apidocs">CGLIB 3.2 javadocs</a>
13-
* for details when working with these classes.
11+
* and javadocs are not available here.
1412
*/
1513
package org.springframework.cglib;

0 commit comments

Comments
 (0)