Plan to support @Transactional in package-private and protected methods in Spring?


Is there a plan to update the java:S2230 rule to add support to Spring Framework 6 (now over 1 year old)?

The rule checks for incorrect use of @Transactional annotation, but since version 6 Spring supports it on public, package-private, and protected methods. There is no alternative in SonarCloud as of now, so either we have to stick to the old Spring rules of annotating only public methods or disable that check altogether, both of which options are unsatisfying.

Source: Using @Transactional :: Spring Framework

1 Like

Hello, @ahaczewski_silent8, and welcome to the Sonar Community!

Thank you for bringing this flaw to our attention; [SONARJAVA-4881] - Jira will address it.


1 Like