Polishing

This commit is contained in:
Juergen Hoeller
2019-06-12 18:04:06 +02:00
parent 7622d1e3fa
commit 1d5a43f485
19 changed files with 40 additions and 40 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -150,7 +150,7 @@ public class CustomCollectionEditor extends PropertyEditorSupport {
* @param initialCapacity the initial capacity
* @return the new Collection instance
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
@SuppressWarnings({"rawtypes", "unchecked"})
protected Collection<Object> createCollection(Class<? extends Collection> collectionType, int initialCapacity) {
if (!collectionType.isInterface()) {
try {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -126,7 +126,7 @@ public class CustomMapEditor extends PropertyEditorSupport {
* @param initialCapacity the initial capacity
* @return the new Map instance
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
@SuppressWarnings({"rawtypes", "unchecked"})
protected Map<Object, Object> createMap(Class<? extends Map> mapType, int initialCapacity) {
if (!mapType.isInterface()) {
try {

View File

@@ -38,7 +38,7 @@ import org.springframework.core.annotation.AliasFor;
* @since 3.1
* @see CacheConfig
*/
@Target({ElementType.METHOD, ElementType.TYPE})
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented

View File

@@ -45,7 +45,7 @@ import org.springframework.core.annotation.AliasFor;
* @since 3.1
* @see CacheConfig
*/
@Target({ElementType.METHOD, ElementType.TYPE})
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented

View File

@@ -52,7 +52,7 @@ import org.springframework.core.annotation.AliasFor;
* @since 3.1
* @see CacheConfig
*/
@Target({ElementType.METHOD, ElementType.TYPE})
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented

View File

@@ -33,7 +33,7 @@ import java.lang.annotation.Target;
* @author Chris Beams
* @since 3.1
*/
@Target({ElementType.METHOD, ElementType.TYPE})
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented

View File

@@ -30,7 +30,7 @@ import java.lang.annotation.Target;
* @since 4.0
* @see org.springframework.beans.factory.config.BeanDefinition#getDescription()
*/
@Target({ElementType.METHOD, ElementType.TYPE})
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Description {

View File

@@ -48,7 +48,7 @@ import java.lang.annotation.Target;
* @see AnnotationAsyncExecutionInterceptor
* @see AsyncAnnotationAdvisor
*/
@Target({ElementType.METHOD, ElementType.TYPE})
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Async {

View File

@@ -115,7 +115,7 @@ public abstract class CollectionFactory {
* @see java.util.TreeSet
* @see java.util.LinkedHashSet
*/
@SuppressWarnings({ "unchecked", "cast", "rawtypes" })
@SuppressWarnings({"rawtypes", "unchecked", "cast"})
public static <E> Collection<E> createApproximateCollection(@Nullable Object collection, int capacity) {
if (collection instanceof LinkedList) {
return new LinkedList<>();
@@ -174,7 +174,7 @@ public abstract class CollectionFactory {
* {@code null}; or if the desired {@code collectionType} is {@link EnumSet} and
* the supplied {@code elementType} is not a subtype of {@link Enum}
*/
@SuppressWarnings({ "unchecked", "cast" })
@SuppressWarnings({"unchecked", "cast"})
public static <E> Collection<E> createCollection(Class<?> collectionType, @Nullable Class<?> elementType, int capacity) {
Assert.notNull(collectionType, "Collection type must not be null");
if (collectionType.isInterface()) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -190,7 +190,7 @@ public class Indexer extends SpelNodeImpl {
throw new SpelEvaluationException(
getStartPosition(), SpelMessage.INDEXING_NOT_SUPPORTED_FOR_TYPE, targetDescriptor);
}
@Override
public boolean isCompilable() {
if (this.indexedType == IndexedType.ARRAY) {
@@ -210,7 +210,7 @@ public class Indexer extends SpelNodeImpl {
}
return false;
}
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
String descriptor = cf.lastDescriptor();
@@ -249,7 +249,7 @@ public class Indexer extends SpelNodeImpl {
mv.visitTypeInsn(CHECKCAST, "[C");
insn = CALOAD;
}
else {
else {
mv.visitTypeInsn(CHECKCAST, "["+ this.exitTypeDescriptor +
(CodeFlow.isPrimitiveArray(this.exitTypeDescriptor) ? "" : ";"));
//depthPlusOne(exitTypeDescriptor)+"Ljava/lang/Object;");
@@ -286,7 +286,7 @@ public class Indexer extends SpelNodeImpl {
}
mv.visitMethodInsn(
INVOKEINTERFACE, "java/util/Map", "get", "(Ljava/lang/Object;)Ljava/lang/Object;", true);
}
}
else if (this.indexedType == IndexedType.OBJECT) {
ReflectivePropertyAccessor.OptimalPropertyAccessor accessor =
@@ -313,7 +313,7 @@ public class Indexer extends SpelNodeImpl {
mv.visitFieldInsn((isStatic ? GETSTATIC : GETFIELD), classDesc, member.getName(),
CodeFlow.toJvmDescriptor(((Field) member).getType()));
}
}
}
cf.pushDescriptor(this.exitTypeDescriptor);
}
@@ -639,7 +639,7 @@ public class Indexer extends SpelNodeImpl {
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@SuppressWarnings({"rawtypes", "unchecked"})
private class CollectionIndexingValueRef implements ValueRef {
private final Collection collection;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -486,7 +486,7 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen
@Override
public boolean isReplyPubSubDomain() {
if (this.replyPubSubDomain != null) {
return replyPubSubDomain;
return this.replyPubSubDomain;
}
else {
return isPubSubDomain();
@@ -718,7 +718,7 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen
* @see SessionAwareMessageListener
* @see #setExposeListenerSession
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
@SuppressWarnings({"rawtypes", "unchecked"})
protected void doInvokeListener(SessionAwareMessageListener listener, Session session, Message message)
throws JMSException {

View File

@@ -40,7 +40,7 @@ import org.springframework.messaging.Message;
* @author Stephane Nicoll
* @since 4.0
*/
@Target({ElementType.METHOD, ElementType.TYPE})
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface SendTo {

View File

@@ -40,7 +40,7 @@ import org.springframework.core.annotation.AliasFor;
* @see org.springframework.messaging.simp.user.UserDestinationMessageHandler
* @see org.springframework.messaging.simp.SimpMessageHeaderAccessor#getUser()
*/
@Target({ElementType.METHOD, ElementType.TYPE})
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface SendToUser {
@@ -68,7 +68,7 @@ public @interface SendToUser {
* or only to the session of the input message being handled.
* <p>By default, this is set to {@code true} in which case messages are
* broadcast to all sessions.
*/
boolean broadcast() default true;
*/
boolean broadcast() default true;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -41,7 +41,7 @@ import org.springframework.core.annotation.AliasFor;
* {@code @DisabledOnMac} annotation can be created as follows.
*
* <pre style="code">
* {@literal @}Target({ ElementType.TYPE, ElementType.METHOD })
* {@literal @}Target({ElementType.TYPE, ElementType.METHOD})
* {@literal @}Retention(RetentionPolicy.RUNTIME)
* {@literal @}DisabledIf(
* expression = "#{systemProperties['os.name'].toLowerCase().contains('mac')}",
@@ -57,7 +57,7 @@ import org.springframework.core.annotation.AliasFor;
* @see EnabledIf
* @see org.junit.jupiter.api.Disabled
*/
@Target({ ElementType.TYPE, ElementType.METHOD })
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@ExtendWith(DisabledIfCondition.class)

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -41,7 +41,7 @@ import org.springframework.core.annotation.AliasFor;
* {@code @EnabledOnMac} annotation can be created as follows.
*
* <pre style="code">
* {@literal @}Target({ ElementType.TYPE, ElementType.METHOD })
* {@literal @}Target({ElementType.TYPE, ElementType.METHOD})
* {@literal @}Retention(RetentionPolicy.RUNTIME)
* {@literal @}EnabledIf(
* expression = "#{systemProperties['os.name'].toLowerCase().contains('mac')}",
@@ -56,7 +56,7 @@ import org.springframework.core.annotation.AliasFor;
* @see DisabledIf
* @see org.junit.jupiter.api.Disabled
*/
@Target({ ElementType.TYPE, ElementType.METHOD })
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@ExtendWith(EnabledIfCondition.class)

View File

@@ -56,7 +56,7 @@ import org.springframework.transaction.TransactionDefinition;
* @see org.springframework.transaction.interceptor.DefaultTransactionAttribute
* @see org.springframework.transaction.interceptor.RuleBasedTransactionAttribute
*/
@Target({ElementType.METHOD, ElementType.TYPE})
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -47,18 +47,18 @@ import org.springframework.web.cors.CorsConfiguration;
* @author Sam Brannen
* @since 4.2
*/
@Target({ ElementType.METHOD, ElementType.TYPE })
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface CrossOrigin {
/** @deprecated as of Spring 5.0, in favor of {@link CorsConfiguration#applyPermitDefaultValues} */
@Deprecated
String[] DEFAULT_ORIGINS = { "*" };
String[] DEFAULT_ORIGINS = {"*"};
/** @deprecated as of Spring 5.0, in favor of {@link CorsConfiguration#applyPermitDefaultValues} */
@Deprecated
String[] DEFAULT_ALLOWED_HEADERS = { "*" };
String[] DEFAULT_ALLOWED_HEADERS = {"*"};
/** @deprecated as of Spring 5.0, in favor of {@link CorsConfiguration#applyPermitDefaultValues} */
@Deprecated

View File

@@ -70,7 +70,7 @@ import org.springframework.core.annotation.AliasFor;
* @see org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter
* @see org.springframework.web.reactive.result.method.annotation.RequestMappingHandlerAdapter
*/
@Target({ElementType.METHOD, ElementType.TYPE})
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Mapping

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -204,7 +204,7 @@ public class ServletWrappingController extends AbstractController
}
@Override
@SuppressWarnings({ "unchecked", "rawtypes" })
@SuppressWarnings({"rawtypes", "unchecked"})
public Enumeration<String> getInitParameterNames() {
return (Enumeration) initParameters.keys();
}