mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Allow null method for getTransactionAttribute
Update MatchAlwaysTransactionAttributeSource.getTransactionAttribute to allow a null method argument. Passing a null method is not recommended and is not indicated as valid in the Javadoc, however, this was allowed in previous versions of Spring. Issue: SPR-11048
This commit is contained in:
+1
-1
@@ -53,7 +53,7 @@ public class MatchAlwaysTransactionAttributeSource implements TransactionAttribu
|
||||
|
||||
@Override
|
||||
public TransactionAttribute getTransactionAttribute(Method method, Class<?> targetClass) {
|
||||
return (ClassUtils.isUserLevelMethod(method) ? this.transactionAttribute : null);
|
||||
return (method == null || ClassUtils.isUserLevelMethod(method) ? this.transactionAttribute : null);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user