Browse Source

Polishing

pull/1203/head
Juergen Hoeller 8 years ago
parent
commit
eafaaa5cb8
  1. 9
      spring-context/src/main/java/org/springframework/cache/annotation/AnnotationCacheOperationSource.java
  2. 2
      spring-messaging/src/main/java/org/springframework/messaging/support/MessageHeaderAccessor.java
  3. 3
      spring-tx/src/main/java/org/springframework/transaction/annotation/JtaTransactionAnnotationParser.java

9
spring-context/src/main/java/org/springframework/cache/annotation/AnnotationCacheOperationSource.java vendored

@ -43,8 +43,7 @@ import org.springframework.util.Assert;
* @since 3.1 * @since 3.1
*/ */
@SuppressWarnings("serial") @SuppressWarnings("serial")
public class AnnotationCacheOperationSource extends AbstractFallbackCacheOperationSource public class AnnotationCacheOperationSource extends AbstractFallbackCacheOperationSource implements Serializable {
implements Serializable {
private final boolean publicMethodsOnly; private final boolean publicMethodsOnly;
@ -177,6 +176,7 @@ public class AnnotationCacheOperationSource extends AbstractFallbackCacheOperati
return this.annotationParsers.hashCode(); return this.annotationParsers.hashCode();
} }
/** /**
* Callback interface providing {@link CacheOperation} instance(s) based on * Callback interface providing {@link CacheOperation} instance(s) based on
* a given {@link CacheAnnotationParser}. * a given {@link CacheAnnotationParser}.
@ -185,10 +185,9 @@ public class AnnotationCacheOperationSource extends AbstractFallbackCacheOperati
protected interface CacheOperationProvider { protected interface CacheOperationProvider {
/** /**
* Returns the {@link CacheOperation} instance(s) provided by the specified parser. * Return the {@link CacheOperation} instance(s) provided by the specified parser.
*
* @param parser the parser to use * @param parser the parser to use
* @return the cache operations or {@code null} if none is found * @return the cache operations, or {@code null} if none found
*/ */
Collection<CacheOperation> getCacheOperations(CacheAnnotationParser parser); Collection<CacheOperation> getCacheOperations(CacheAnnotationParser parser);
} }

2
spring-messaging/src/main/java/org/springframework/messaging/support/MessageHeaderAccessor.java

@ -567,7 +567,7 @@ public class MessageHeaderAccessor {
* of the given {@code Message}, or {@code null} if that's not available or if * of the given {@code Message}, or {@code null} if that's not available or if
* its type does not match the required type. * its type does not match the required type.
* <p>This is for cases where the existence of an accessor is strongly expected * <p>This is for cases where the existence of an accessor is strongly expected
* (to be followed up with an assertion) or will created if not provided. * (followed up with an assertion) or where an accessor will be created otherwise.
* @return an accessor instance of the specified type, or {@code null} if none * @return an accessor instance of the specified type, or {@code null} if none
* @since 4.1 * @since 4.1
*/ */

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

@ -39,7 +39,8 @@ public class JtaTransactionAnnotationParser implements TransactionAnnotationPars
@Override @Override
public TransactionAttribute parseTransactionAnnotation(AnnotatedElement ae) { public TransactionAttribute parseTransactionAnnotation(AnnotatedElement ae) {
AnnotationAttributes attributes = AnnotatedElementUtils.getMergedAnnotationAttributes(ae, javax.transaction.Transactional.class); AnnotationAttributes attributes =
AnnotatedElementUtils.getMergedAnnotationAttributes(ae, javax.transaction.Transactional.class);
if (attributes != null) { if (attributes != null) {
return parseTransactionAnnotation(attributes); return parseTransactionAnnotation(attributes);
} }

Loading…
Cancel
Save