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;

0 commit comments

Comments
 (0)