Skip to content

Commit 1d5a43f

Browse files
committed
Polishing
1 parent 7622d1e commit 1d5a43f

File tree

19 files changed

+40
-40
lines changed

19 files changed

+40
-40
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
@@ -115,7 +115,7 @@ public static boolean isApproximableCollectionType(@Nullable Class<?> collection
115115
* @see java.util.TreeSet
116116
* @see java.util.LinkedHashSet
117117
*/
118-
@SuppressWarnings({ "unchecked", "cast", "rawtypes" })
118+
@SuppressWarnings({"rawtypes", "unchecked", "cast"})
119119
public static <E> Collection<E> createApproximateCollection(@Nullable Object collection, int capacity) {
120120
if (collection instanceof LinkedList) {
121121
return new LinkedList<>();
@@ -174,7 +174,7 @@ public static <E> Collection<E> createCollection(Class<?> collectionType, int ca
174174
* {@code null}; or if the desired {@code collectionType} is {@link EnumSet} and
175175
* the supplied {@code elementType} is not a subtype of {@link Enum}
176176
*/
177-
@SuppressWarnings({ "unchecked", "cast" })
177+
@SuppressWarnings({"unchecked", "cast"})
178178
public static <E> Collection<E> createCollection(Class<?> collectionType, @Nullable Class<?> elementType, int capacity) {
179179
Assert.notNull(collectionType, "Collection type must not be null");
180180
if (collectionType.isInterface()) {

spring-expression/src/main/java/org/springframework/expression/spel/ast/Indexer.java

Lines changed: 7 additions & 7 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.
@@ -190,7 +190,7 @@ else if (target instanceof Collection) {
190190
throw new SpelEvaluationException(
191191
getStartPosition(), SpelMessage.INDEXING_NOT_SUPPORTED_FOR_TYPE, targetDescriptor);
192192
}
193-
193+
194194
@Override
195195
public boolean isCompilable() {
196196
if (this.indexedType == IndexedType.ARRAY) {
@@ -210,7 +210,7 @@ else if (this.indexedType == IndexedType.OBJECT) {
210210
}
211211
return false;
212212
}
213-
213+
214214
@Override
215215
public void generateCode(MethodVisitor mv, CodeFlow cf) {
216216
String descriptor = cf.lastDescriptor();
@@ -249,7 +249,7 @@ else if ("C".equals(this.exitTypeDescriptor)) {
249249
mv.visitTypeInsn(CHECKCAST, "[C");
250250
insn = CALOAD;
251251
}
252-
else {
252+
else {
253253
mv.visitTypeInsn(CHECKCAST, "["+ this.exitTypeDescriptor +
254254
(CodeFlow.isPrimitiveArray(this.exitTypeDescriptor) ? "" : ";"));
255255
//depthPlusOne(exitTypeDescriptor)+"Ljava/lang/Object;");
@@ -286,7 +286,7 @@ else if (this.indexedType == IndexedType.MAP) {
286286
}
287287
mv.visitMethodInsn(
288288
INVOKEINTERFACE, "java/util/Map", "get", "(Ljava/lang/Object;)Ljava/lang/Object;", true);
289-
}
289+
}
290290

291291
else if (this.indexedType == IndexedType.OBJECT) {
292292
ReflectivePropertyAccessor.OptimalPropertyAccessor accessor =
@@ -313,7 +313,7 @@ else if (this.indexedType == IndexedType.OBJECT) {
313313
mv.visitFieldInsn((isStatic ? GETSTATIC : GETFIELD), classDesc, member.getName(),
314314
CodeFlow.toJvmDescriptor(((Field) member).getType()));
315315
}
316-
}
316+
}
317317

318318
cf.pushDescriptor(this.exitTypeDescriptor);
319319
}
@@ -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: 3 additions & 3 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.
@@ -486,7 +486,7 @@ public void setReplyPubSubDomain(boolean replyPubSubDomain) {
486486
@Override
487487
public boolean isReplyPubSubDomain() {
488488
if (this.replyPubSubDomain != null) {
489-
return replyPubSubDomain;
489+
return this.replyPubSubDomain;
490490
}
491491
else {
492492
return isPubSubDomain();
@@ -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
@@ -40,7 +40,7 @@
4040
* @author Stephane Nicoll
4141
* @since 4.0
4242
*/
43-
@Target({ElementType.METHOD, ElementType.TYPE})
43+
@Target({ElementType.TYPE, ElementType.METHOD})
4444
@Retention(RetentionPolicy.RUNTIME)
4545
@Documented
4646
public @interface SendTo {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
* @see org.springframework.messaging.simp.user.UserDestinationMessageHandler
4141
* @see org.springframework.messaging.simp.SimpMessageHeaderAccessor#getUser()
4242
*/
43-
@Target({ElementType.METHOD, ElementType.TYPE})
43+
@Target({ElementType.TYPE, ElementType.METHOD})
4444
@Retention(RetentionPolicy.RUNTIME)
4545
@Documented
4646
public @interface SendToUser {
@@ -68,7 +68,7 @@
6868
* or only to the session of the input message being handled.
6969
* <p>By default, this is set to {@code true} in which case messages are
7070
* broadcast to all sessions.
71-
*/
72-
boolean broadcast() default true;
71+
*/
72+
boolean broadcast() default true;
7373

7474
}

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)