Skip to content

Commit fc46abf

Browse files
committed
Polishing
1 parent 1ccd99e commit fc46abf

File tree

19 files changed

+32
-32
lines changed

19 files changed

+32
-32
lines changed

spring-beans/src/main/java/org/springframework/beans/propertyeditors/CustomCollectionEditor.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.
@@ -150,7 +150,7 @@ else if (value.getClass().isArray()) {
150150
* @param initialCapacity the initial capacity
151151
* @return the new Collection instance
152152
*/
153-
@SuppressWarnings({ "rawtypes", "unchecked" })
153+
@SuppressWarnings({"rawtypes", "unchecked"})
154154
protected Collection<Object> createCollection(Class<? extends Collection> collectionType, int initialCapacity) {
155155
if (!collectionType.isInterface()) {
156156
try {

spring-beans/src/main/java/org/springframework/beans/propertyeditors/CustomMapEditor.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.
@@ -126,7 +126,7 @@ else if (value instanceof Map) {
126126
* @param initialCapacity the initial capacity
127127
* @return the new Map instance
128128
*/
129-
@SuppressWarnings({ "rawtypes", "unchecked" })
129+
@SuppressWarnings({"rawtypes", "unchecked"})
130130
protected Map<Object, Object> createMap(Class<? extends Map> mapType, int initialCapacity) {
131131
if (!mapType.isInterface()) {
132132
try {

spring-context/src/main/java/org/springframework/cache/annotation/CacheEvict.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
* @since 3.1
3939
* @see CacheConfig
4040
*/
41-
@Target({ElementType.METHOD, ElementType.TYPE})
41+
@Target({ElementType.TYPE, ElementType.METHOD})
4242
@Retention(RetentionPolicy.RUNTIME)
4343
@Inherited
4444
@Documented

spring-context/src/main/java/org/springframework/cache/annotation/CachePut.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
* @since 3.1
4646
* @see CacheConfig
4747
*/
48-
@Target({ElementType.METHOD, ElementType.TYPE})
48+
@Target({ElementType.TYPE, ElementType.METHOD})
4949
@Retention(RetentionPolicy.RUNTIME)
5050
@Inherited
5151
@Documented

spring-context/src/main/java/org/springframework/cache/annotation/Cacheable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
* @since 3.1
5353
* @see CacheConfig
5454
*/
55-
@Target({ElementType.METHOD, ElementType.TYPE})
55+
@Target({ElementType.TYPE, ElementType.METHOD})
5656
@Retention(RetentionPolicy.RUNTIME)
5757
@Inherited
5858
@Documented

spring-context/src/main/java/org/springframework/cache/annotation/Caching.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* @author Chris Beams
3434
* @since 3.1
3535
*/
36-
@Target({ElementType.METHOD, ElementType.TYPE})
36+
@Target({ElementType.TYPE, ElementType.METHOD})
3737
@Retention(RetentionPolicy.RUNTIME)
3838
@Inherited
3939
@Documented

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* @since 4.0
3131
* @see org.springframework.beans.factory.config.BeanDefinition#getDescription()
3232
*/
33-
@Target({ElementType.METHOD, ElementType.TYPE})
33+
@Target({ElementType.TYPE, ElementType.METHOD})
3434
@Retention(RetentionPolicy.RUNTIME)
3535
@Documented
3636
public @interface Description {

spring-context/src/main/java/org/springframework/scheduling/annotation/Async.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
* @see AnnotationAsyncExecutionInterceptor
4949
* @see AsyncAnnotationAdvisor
5050
*/
51-
@Target({ElementType.METHOD, ElementType.TYPE})
51+
@Target({ElementType.TYPE, ElementType.METHOD})
5252
@Retention(RetentionPolicy.RUNTIME)
5353
@Documented
5454
public @interface Async {

spring-core/src/main/java/org/springframework/core/CollectionFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public static boolean isApproximableCollectionType(@Nullable Class<?> collection
119119
* @see java.util.TreeSet
120120
* @see java.util.LinkedHashSet
121121
*/
122-
@SuppressWarnings({ "unchecked", "cast", "rawtypes" })
122+
@SuppressWarnings({"rawtypes", "unchecked", "cast"})
123123
public static <E> Collection<E> createApproximateCollection(@Nullable Object collection, int capacity) {
124124
if (collection instanceof LinkedList) {
125125
return new LinkedList<>();
@@ -178,7 +178,7 @@ public static <E> Collection<E> createCollection(Class<?> collectionType, int ca
178178
* {@code null}; or if the desired {@code collectionType} is {@link EnumSet} and
179179
* the supplied {@code elementType} is not a subtype of {@link Enum}
180180
*/
181-
@SuppressWarnings({ "unchecked", "cast" })
181+
@SuppressWarnings({"unchecked", "cast"})
182182
public static <E> Collection<E> createCollection(Class<?> collectionType, @Nullable Class<?> elementType, int capacity) {
183183
Assert.notNull(collectionType, "Collection type must not be null");
184184
if (collectionType.isInterface()) {

spring-expression/src/main/java/org/springframework/expression/spel/ast/Indexer.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.
@@ -639,7 +639,7 @@ public boolean isWritable() {
639639
}
640640

641641

642-
@SuppressWarnings({ "rawtypes", "unchecked" })
642+
@SuppressWarnings({"rawtypes", "unchecked"})
643643
private class CollectionIndexingValueRef implements ValueRef {
644644

645645
private final Collection collection;

spring-jms/src/main/java/org/springframework/jms/listener/AbstractMessageListenerContainer.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.
@@ -718,7 +718,7 @@ else if (listener != null) {
718718
* @see SessionAwareMessageListener
719719
* @see #setExposeListenerSession
720720
*/
721-
@SuppressWarnings({ "unchecked", "rawtypes" })
721+
@SuppressWarnings({"rawtypes", "unchecked"})
722722
protected void doInvokeListener(SessionAwareMessageListener listener, Session session, Message message)
723723
throws JMSException {
724724

spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/SendTo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
* @author Stephane Nicoll
4040
* @since 4.0
4141
*/
42-
@Target({ElementType.METHOD, ElementType.TYPE})
42+
@Target({ElementType.TYPE, ElementType.METHOD})
4343
@Retention(RetentionPolicy.RUNTIME)
4444
@Documented
4545
public @interface SendTo {

spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/SendToUser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
* @see org.springframework.messaging.simp.user.UserDestinationMessageHandler
4545
* @see org.springframework.messaging.simp.SimpMessageHeaderAccessor#getUser()
4646
*/
47-
@Target({ElementType.METHOD, ElementType.TYPE})
47+
@Target({ElementType.TYPE, ElementType.METHOD})
4848
@Retention(RetentionPolicy.RUNTIME)
4949
@Documented
5050
public @interface SendToUser {

spring-test/src/main/java/org/springframework/test/context/junit/jupiter/DisabledIf.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-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.
@@ -41,7 +41,7 @@
4141
* {@code @DisabledOnMac} annotation can be created as follows.
4242
*
4343
* <pre style="code">
44-
* {@literal @}Target({ ElementType.TYPE, ElementType.METHOD })
44+
* {@literal @}Target({ElementType.TYPE, ElementType.METHOD})
4545
* {@literal @}Retention(RetentionPolicy.RUNTIME)
4646
* {@literal @}DisabledIf(
4747
* expression = "#{systemProperties['os.name'].toLowerCase().contains('mac')}",
@@ -57,7 +57,7 @@
5757
* @see EnabledIf
5858
* @see org.junit.jupiter.api.Disabled
5959
*/
60-
@Target({ ElementType.TYPE, ElementType.METHOD })
60+
@Target({ElementType.TYPE, ElementType.METHOD})
6161
@Retention(RetentionPolicy.RUNTIME)
6262
@Documented
6363
@ExtendWith(DisabledIfCondition.class)

spring-test/src/main/java/org/springframework/test/context/junit/jupiter/EnabledIf.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-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.
@@ -41,7 +41,7 @@
4141
* {@code @EnabledOnMac} annotation can be created as follows.
4242
*
4343
* <pre style="code">
44-
* {@literal @}Target({ ElementType.TYPE, ElementType.METHOD })
44+
* {@literal @}Target({ElementType.TYPE, ElementType.METHOD})
4545
* {@literal @}Retention(RetentionPolicy.RUNTIME)
4646
* {@literal @}EnabledIf(
4747
* expression = "#{systemProperties['os.name'].toLowerCase().contains('mac')}",
@@ -56,7 +56,7 @@
5656
* @see DisabledIf
5757
* @see org.junit.jupiter.api.Disabled
5858
*/
59-
@Target({ ElementType.TYPE, ElementType.METHOD })
59+
@Target({ElementType.TYPE, ElementType.METHOD})
6060
@Retention(RetentionPolicy.RUNTIME)
6161
@Documented
6262
@ExtendWith(EnabledIfCondition.class)

spring-tx/src/main/java/org/springframework/transaction/annotation/Transactional.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
* @see org.springframework.transaction.interceptor.DefaultTransactionAttribute
5757
* @see org.springframework.transaction.interceptor.RuleBasedTransactionAttribute
5858
*/
59-
@Target({ElementType.METHOD, ElementType.TYPE})
59+
@Target({ElementType.TYPE, ElementType.METHOD})
6060
@Retention(RetentionPolicy.RUNTIME)
6161
@Inherited
6262
@Documented

spring-web/src/main/java/org/springframework/web/bind/annotation/CrossOrigin.java

Lines changed: 4 additions & 4 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.
@@ -47,18 +47,18 @@
4747
* @author Sam Brannen
4848
* @since 4.2
4949
*/
50-
@Target({ ElementType.METHOD, ElementType.TYPE })
50+
@Target({ElementType.TYPE, ElementType.METHOD})
5151
@Retention(RetentionPolicy.RUNTIME)
5252
@Documented
5353
public @interface CrossOrigin {
5454

5555
/** @deprecated as of Spring 5.0, in favor of {@link CorsConfiguration#applyPermitDefaultValues} */
5656
@Deprecated
57-
String[] DEFAULT_ORIGINS = { "*" };
57+
String[] DEFAULT_ORIGINS = {"*"};
5858

5959
/** @deprecated as of Spring 5.0, in favor of {@link CorsConfiguration#applyPermitDefaultValues} */
6060
@Deprecated
61-
String[] DEFAULT_ALLOWED_HEADERS = { "*" };
61+
String[] DEFAULT_ALLOWED_HEADERS = {"*"};
6262

6363
/** @deprecated as of Spring 5.0, in favor of {@link CorsConfiguration#applyPermitDefaultValues} */
6464
@Deprecated

spring-web/src/main/java/org/springframework/web/bind/annotation/RequestMapping.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
* @see org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter
7171
* @see org.springframework.web.reactive.result.method.annotation.RequestMappingHandlerAdapter
7272
*/
73-
@Target({ElementType.METHOD, ElementType.TYPE})
73+
@Target({ElementType.TYPE, ElementType.METHOD})
7474
@Retention(RetentionPolicy.RUNTIME)
7575
@Documented
7676
@Mapping

spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/ServletWrappingController.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.
@@ -204,7 +204,7 @@ public String getInitParameter(String paramName) {
204204
}
205205

206206
@Override
207-
@SuppressWarnings({ "unchecked", "rawtypes" })
207+
@SuppressWarnings({"rawtypes", "unchecked"})
208208
public Enumeration<String> getInitParameterNames() {
209209
return (Enumeration) initParameters.keys();
210210
}

0 commit comments

Comments
 (0)