Skip to content

Commit cc93c2a

Browse files
committed
Polishing
1 parent 15c7044 commit cc93c2a

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

spring-core/src/test/java/org/springframework/tests/Assume.java

-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ public static void canLoadNativeDirFonts() {
113113
/**
114114
* @since 4.2
115115
*/
116-
@FunctionalInterface
117116
public interface Executable {
118117

119118
void execute() throws Exception;

spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAspectSupport.java

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2014 the original author or authors.
2+
* Copyright 2002-2016 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.
@@ -17,6 +17,7 @@
1717
package org.springframework.transaction.interceptor;
1818

1919
import java.lang.reflect.Method;
20+
import java.util.Map;
2021
import java.util.Properties;
2122
import java.util.concurrent.ConcurrentHashMap;
2223

@@ -85,7 +86,7 @@ public abstract class TransactionAspectSupport implements BeanFactoryAware, Init
8586
new NamedThreadLocal<TransactionInfo>("Current aspect-driven transaction");
8687

8788

88-
private final ConcurrentHashMap<Object, PlatformTransactionManager> transactionManagerCache =
89+
private final Map<Object, PlatformTransactionManager> transactionManagerCache =
8990
new ConcurrentHashMap<Object, PlatformTransactionManager>();
9091

9192
/**
@@ -243,7 +244,7 @@ protected final BeanFactory getBeanFactory() {
243244
public void afterPropertiesSet() {
244245
if (getTransactionManager() == null && this.beanFactory == null) {
245246
throw new IllegalStateException(
246-
"Setting the property 'transactionManager' or running in a ListableBeanFactory is required");
247+
"Setting the property 'transactionManager' or running in a BeanFactory is required");
247248
}
248249
if (this.transactionAttributeSource == null) {
249250
throw new IllegalStateException(
@@ -449,17 +450,16 @@ protected TransactionInfo prepareTransactionInfo(PlatformTransactionManager tm,
449450

450451
TransactionInfo txInfo = new TransactionInfo(tm, txAttr, joinpointIdentification);
451452
if (txAttr != null) {
452-
// We need a transaction for this method
453+
// We need a transaction for this method...
453454
if (logger.isTraceEnabled()) {
454455
logger.trace("Getting transaction for [" + txInfo.getJoinpointIdentification() + "]");
455456
}
456-
// The transaction manager will flag an error if an incompatible tx already exists
457+
// The transaction manager will flag an error if an incompatible tx already exists.
457458
txInfo.newTransactionStatus(status);
458459
}
459460
else {
460-
// The TransactionInfo.hasTransaction() method will return
461-
// false. We created it only to preserve the integrity of
462-
// the ThreadLocal stack maintained in this class.
461+
// The TransactionInfo.hasTransaction() method will return false. We created it only
462+
// to preserve the integrity of the ThreadLocal stack maintained in this class.
463463
if (logger.isTraceEnabled())
464464
logger.trace("Don't need to create transaction for [" + joinpointIdentification +
465465
"]: This method isn't transactional.");

0 commit comments

Comments
 (0)