When a class is annotated @Transactional, overriding the method and just calling super is useful, as it will make the method transactional.
@Transactional public class MyClass extends BaseClass { @Override public void test() { // Sonar Rule S1185 is thrown here although it makes sense to implement this method because i want it to be transactional super.test(); } }
- relates to
-
RSPEC-1185 Overriding methods should do more than simply call the same method in the super class
- Active
- links to