extends BasicOperation, C
*/
CacheInvocationParameter[] getAllParameters(Object... values);
-}
\ No newline at end of file
+}
diff --git a/spring-context/src/main/java/org/springframework/context/ResourceLoaderAware.java b/spring-context/src/main/java/org/springframework/context/ResourceLoaderAware.java
index cf9edd7101..672a2b37a0 100644
--- a/spring-context/src/main/java/org/springframework/context/ResourceLoaderAware.java
+++ b/spring-context/src/main/java/org/springframework/context/ResourceLoaderAware.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 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.
@@ -20,44 +20,44 @@ import org.springframework.beans.factory.Aware;
import org.springframework.core.io.ResourceLoader;
/**
- * Interface to be implemented by any object that wishes to be notified of
- * the ResourceLoader (typically the ApplicationContext) that it runs in.
- * This is an alternative to a full ApplicationContext dependency via the
- * ApplicationContextAware interface.
+ * Interface to be implemented by any object that wishes to be notified of the
+ * {@link ResourceLoader} (typically the ApplicationContext) that it runs in.
+ * This is an alternative to a full {@link ApplicationContext} dependency via
+ * the {@link org.springframework.context.ApplicationContextAware} interface.
*
- * Note that Resource dependencies can also be exposed as bean properties
- * of type Resource, populated via Strings with automatic type conversion by
- * the bean factory. This removes the need for implementing any callback
- * interface just for the purpose of accessing a specific file resource.
+ *
Note that {@link org.springframework.core.io.Resource} dependencies can also
+ * be exposed as bean properties of type {@code Resource}, populated via Strings
+ * with automatic type conversion by the bean factory. This removes the need for
+ * implementing any callback interface just for the purpose of accessing a
+ * specific file resource.
*
- *
You typically need a ResourceLoader when your application object has
- * to access a variety of file resources whose names are calculated. A good
- * strategy is to make the object use a DefaultResourceLoader but still
- * implement ResourceLoaderAware to allow for overriding when running in an
- * ApplicationContext. See ReloadableResourceBundleMessageSource for an example.
+ *
You typically need a {@link ResourceLoader} when your application object has to
+ * access a variety of file resources whose names are calculated. A good strategy is
+ * to make the object use a {@link org.springframework.core.io.DefaultResourceLoader}
+ * but still implement {@code ResourceLoaderAware} to allow for overriding when
+ * running in an {@code ApplicationContext}. See
+ * {@link org.springframework.context.support.ReloadableResourceBundleMessageSource}
+ * for an example.
*
- *
A passed-in ResourceLoader can also be checked for the
- * ResourcePatternResolver interface and cast accordingly, to be able
- * to resolve resource patterns into arrays of Resource objects. This will always
- * work when running in an ApplicationContext (the context interface extends
- * ResourcePatternResolver). Use a PathMatchingResourcePatternResolver as default.
- * See also the {@code ResourcePatternUtils.getResourcePatternResolver} method.
+ *
A passed-in {@code ResourceLoader} can also be checked for the
+ * {@link org.springframework.core.io.support.ResourcePatternResolver} interface
+ * and cast accordingly, in order to resolve resource patterns into arrays of
+ * {@code Resource} objects. This will always work when running in an ApplicationContext
+ * (since the context interface extends the ResourcePatternResolver interface). Use a
+ * {@link org.springframework.core.io.support.PathMatchingResourcePatternResolver} as
+ * default; see also the {@code ResourcePatternUtils.getResourcePatternResolver} method.
*
- *
As alternative to a ResourcePatternResolver dependency, consider exposing
- * bean properties of type Resource array, populated via pattern Strings with
- * automatic type conversion by the bean factory.
+ *
As an alternative to a {@code ResourcePatternResolver} dependency, consider
+ * exposing bean properties of type {@code Resource} array, populated via pattern
+ * Strings with automatic type conversion by the bean factory at binding time.
*
* @author Juergen Hoeller
* @author Chris Beams
* @since 10.03.2004
* @see ApplicationContextAware
- * @see org.springframework.beans.factory.InitializingBean
* @see org.springframework.core.io.Resource
+ * @see org.springframework.core.io.ResourceLoader
* @see org.springframework.core.io.support.ResourcePatternResolver
- * @see org.springframework.core.io.support.ResourcePatternUtils#getResourcePatternResolver
- * @see org.springframework.core.io.DefaultResourceLoader
- * @see org.springframework.core.io.support.PathMatchingResourcePatternResolver
- * @see org.springframework.context.support.ReloadableResourceBundleMessageSource
*/
public interface ResourceLoaderAware extends Aware {
@@ -69,7 +69,7 @@ public interface ResourceLoaderAware extends Aware {
*
Invoked after population of normal bean properties but before an init callback
* like InitializingBean's {@code afterPropertiesSet} or a custom init-method.
* Invoked before ApplicationContextAware's {@code setApplicationContext}.
- * @param resourceLoader ResourceLoader object to be used by this object
+ * @param resourceLoader the ResourceLoader object to be used by this object
* @see org.springframework.core.io.support.ResourcePatternResolver
* @see org.springframework.core.io.support.ResourcePatternUtils#getResourcePatternResolver
*/
diff --git a/spring-core/src/main/java/org/springframework/core/io/support/ResourcePatternUtils.java b/spring-core/src/main/java/org/springframework/core/io/support/ResourcePatternUtils.java
index e9721a9517..eb6f98f2f4 100644
--- a/spring-core/src/main/java/org/springframework/core/io/support/ResourcePatternUtils.java
+++ b/spring-core/src/main/java/org/springframework/core/io/support/ResourcePatternUtils.java
@@ -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.
@@ -48,10 +48,10 @@ public abstract class ResourcePatternUtils {
}
/**
- * Return a default ResourcePatternResolver for the given ResourceLoader.
- *
This might be the ResourceLoader itself, if it implements the
- * ResourcePatternResolver extension, or a PathMatchingResourcePatternResolver
- * built on the given ResourceLoader.
+ * Return a default {@link ResourcePatternResolver} for the given {@link ResourceLoader}.
+ *
This might be the {@code ResourceLoader} itself, if it implements the
+ * {@code ResourcePatternResolver} extension, or a default
+ * {@link PathMatchingResourcePatternResolver} built on the given {@code ResourceLoader}.
* @param resourceLoader the ResourceLoader to build a pattern resolver for
* (may be {@code null} to indicate a default ResourceLoader)
* @return the ResourcePatternResolver
diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/CompoundExpression.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/CompoundExpression.java
index 26c17fb084..841d325d10 100644
--- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/CompoundExpression.java
+++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/CompoundExpression.java
@@ -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.
@@ -24,7 +24,8 @@ import org.springframework.expression.spel.ExpressionState;
import org.springframework.expression.spel.SpelEvaluationException;
/**
- * Represents a DOT separated expression sequence, such as 'property1.property2.methodOne()'
+ * Represents a DOT separated expression sequence, such as
+ * {@code 'property1.property2.methodOne()'}.
*
* @author Andy Clement
* @since 3.0
@@ -111,7 +112,7 @@ public class CompoundExpression extends SpelNodeImpl {
}
return sb.toString();
}
-
+
@Override
public boolean isCompilable() {
for (SpelNodeImpl child: this.children) {
@@ -121,11 +122,11 @@ public class CompoundExpression extends SpelNodeImpl {
}
return true;
}
-
+
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
- for (int i = 0; i < this.children.length;i++) {
- this.children[i].generateCode(mv, cf);
+ for (SpelNodeImpl child : this.children) {
+ child.generateCode(mv, cf);
}
cf.pushDescriptor(this.exitTypeDescriptor);
}
diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttribute.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttribute.java
index debf7a9523..79991f122f 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttribute.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttribute.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 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.
@@ -20,8 +20,8 @@ import org.springframework.transaction.TransactionDefinition;
/**
* This interface adds a {@code rollbackOn} specification to {@link TransactionDefinition}.
- * As custom {@code rollbackOn} is only possible with AOP, this class resides
- * in the AOP transaction package.
+ * As custom {@code rollbackOn} is only possible with AOP, it resides in the AOP-related
+ * transaction subpackage.
*
* @author Rod Johnson
* @author Juergen Hoeller
@@ -35,6 +35,7 @@ public interface TransactionAttribute extends TransactionDefinition {
* Return a qualifier value associated with this transaction attribute.
*
This may be used for choosing a corresponding transaction manager
* to process this specific transaction.
+ * @since 3.0
*/
String getQualifier();
diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeEditor.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeEditor.java
index a7d2abdfed..ed284719e9 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeEditor.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeEditor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 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.
@@ -45,7 +45,6 @@ public class TransactionAttributeEditor extends PropertyEditorSupport {
/**
* Format is PROPAGATION_NAME,ISOLATION_NAME,readOnly,timeout_NNNN,+Exception1,-Exception2.
* Null or the empty string means that the method is non transactional.
- * @see java.beans.PropertyEditor#setAsText(java.lang.String)
*/
@Override
public void setAsText(String text) throws IllegalArgumentException {
@@ -53,36 +52,36 @@ public class TransactionAttributeEditor extends PropertyEditorSupport {
// tokenize it with ","
String[] tokens = StringUtils.commaDelimitedListToStringArray(text);
RuleBasedTransactionAttribute attr = new RuleBasedTransactionAttribute();
- for (int i = 0; i < tokens.length; i++) {
+ for (String token : tokens) {
// Trim leading and trailing whitespace.
- String token = StringUtils.trimWhitespace(tokens[i].trim());
+ String trimmedToken = StringUtils.trimWhitespace(token.trim());
// Check whether token contains illegal whitespace within text.
- if (StringUtils.containsWhitespace(token)) {
+ if (StringUtils.containsWhitespace(trimmedToken)) {
throw new IllegalArgumentException(
- "Transaction attribute token contains illegal whitespace: [" + token + "]");
+ "Transaction attribute token contains illegal whitespace: [" + trimmedToken + "]");
}
// Check token type.
- if (token.startsWith(RuleBasedTransactionAttribute.PREFIX_PROPAGATION)) {
- attr.setPropagationBehaviorName(token);
+ if (trimmedToken.startsWith(RuleBasedTransactionAttribute.PREFIX_PROPAGATION)) {
+ attr.setPropagationBehaviorName(trimmedToken);
}
- else if (token.startsWith(RuleBasedTransactionAttribute.PREFIX_ISOLATION)) {
- attr.setIsolationLevelName(token);
+ else if (trimmedToken.startsWith(RuleBasedTransactionAttribute.PREFIX_ISOLATION)) {
+ attr.setIsolationLevelName(trimmedToken);
}
- else if (token.startsWith(RuleBasedTransactionAttribute.PREFIX_TIMEOUT)) {
- String value = token.substring(DefaultTransactionAttribute.PREFIX_TIMEOUT.length());
+ else if (trimmedToken.startsWith(RuleBasedTransactionAttribute.PREFIX_TIMEOUT)) {
+ String value = trimmedToken.substring(DefaultTransactionAttribute.PREFIX_TIMEOUT.length());
attr.setTimeout(Integer.parseInt(value));
}
- else if (token.equals(RuleBasedTransactionAttribute.READ_ONLY_MARKER)) {
+ else if (trimmedToken.equals(RuleBasedTransactionAttribute.READ_ONLY_MARKER)) {
attr.setReadOnly(true);
}
- else if (token.startsWith(RuleBasedTransactionAttribute.PREFIX_COMMIT_RULE)) {
- attr.getRollbackRules().add(new NoRollbackRuleAttribute(token.substring(1)));
+ else if (trimmedToken.startsWith(RuleBasedTransactionAttribute.PREFIX_COMMIT_RULE)) {
+ attr.getRollbackRules().add(new NoRollbackRuleAttribute(trimmedToken.substring(1)));
}
- else if (token.startsWith(RuleBasedTransactionAttribute.PREFIX_ROLLBACK_RULE)) {
- attr.getRollbackRules().add(new RollbackRuleAttribute(token.substring(1)));
+ else if (trimmedToken.startsWith(RuleBasedTransactionAttribute.PREFIX_ROLLBACK_RULE)) {
+ attr.getRollbackRules().add(new RollbackRuleAttribute(trimmedToken.substring(1)));
}
else {
- throw new IllegalArgumentException("Invalid transaction attribute token: [" + token + "]");
+ throw new IllegalArgumentException("Invalid transaction attribute token: [" + trimmedToken + "]");
}
}
setValue(attr);