Skip to content

Potential null-pointer in TransactionAspectSupport.determineTransactionManager() [SPR-7153] #11812

Closed

Description

@spring-projects-issues

Oliver Drotbohm opened SPR-7153 and commented

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.


Affects: 3.0.2

Issue Links:

Referenced from: commits b0afa0c

Activity

  1. spring-projects-issues commented on May 2, 2010

    @spring-projects-issues
    CollaboratorAuthor

    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

  2. added
    type: bug
    in: data
    on Jan 11, 2019
  3. added this to the 3.0.3 milestone on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: datatype: bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions