Skip to content

Commit eb573d8

Browse files
committed
Restore original MethodMapTransactionAttributeSource matching rules
Issue: SPR-16733 (cherry picked from commit c5b524d)
1 parent b312a62 commit eb573d8

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
import org.springframework.util.ClassUtils;
3333
import org.springframework.util.ObjectUtils;
3434
import org.springframework.util.PatternMatchUtils;
35-
import org.springframework.util.ReflectionUtils;
3635

3736
/**
3837
* Simple {@link TransactionAttributeSource} implementation that
@@ -145,7 +144,7 @@ public void addTransactionalMethod(Class<?> clazz, String mappedName, Transactio
145144
Assert.notNull(mappedName, "Mapped name must not be null");
146145
String name = clazz.getName() + '.' + mappedName;
147146

148-
Method[] methods = ReflectionUtils.getAllDeclaredMethods(clazz);
147+
Method[] methods = clazz.getDeclaredMethods();
149148
List<Method> matchingMethods = new ArrayList<>();
150149
for (Method method : methods) {
151150
if (isMatch(method.getName(), mappedName)) {

spring-tx/src/test/resources/org/springframework/transaction/interceptor/transactionalBeanFactory.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<property name="transactionAttributeSource">
2424
<value>
2525
org.springframework.tests.sample.beans.ITestBean.s*=PROPAGATION_MANDATORY
26-
org.springframework.tests.sample.beans.ITestBean.setAg*=PROPAGATION_REQUIRED
26+
org.springframework.tests.sample.beans.AgeHolder.setAg*=PROPAGATION_REQUIRED
2727
org.springframework.tests.sample.beans.ITestBean.set*= PROPAGATION_SUPPORTS , readOnly
2828
</value>
2929
</property>

0 commit comments

Comments
 (0)