You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Potential null-pointer in TransactionAspectSupport.determineTransactionManager() [SPR-7153] #11812
The logic in TransactionInterceptor.invoke(...) retrieves TransactionAttribute from a TransactionAttributeSource which according to the API can be null. determineTransactionManager of the super class then accesses txAttr.getQualifier() without a null check. The qualifier can be simply null in case txAttr is null.
Well spotted. Fixed for 3.0.3, only retrieving the transaction manager when actually necessary now. We can't just fall back to a null qualifier in that case either since we may fail to find a default transaction manager bean... It's safer to simply not retrieve a transaction manager bean in the first place then, since it won't be used anyway.
Activity
spring-projects-issues commentedon May 2, 2010
Juergen Hoeller commented
Well spotted. Fixed for 3.0.3, only retrieving the transaction manager when actually necessary now. We can't just fall back to a null qualifier in that case either since we may fail to find a default transaction manager bean... It's safer to simply not retrieve a transaction manager bean in the first place then, since it won't be used anyway.
Juergen