Uploaded image for project: 'SonarJava'
  1. SonarJava
  2. SONARJAVA-3612

FP in S1185 when class is annotated "@Transactional"

    XMLWordPrintable

    Details

    • Type: False-Positive
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.10
    • Component/s: Rules
    • Labels:
      None

      Description

      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();
        }
      }
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              quentin.jaquier Quentin Jaquier
              Reporter:
              quentin.jaquier Quentin Jaquier
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: