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

Rule "Thread.run() and Runnable.run() should not be called directly" should not log an issue when calling super.run()

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1
    • Component/s: Rules
    • Labels:
      None

      Description

      In following case, the rule currently generates a false-positive :

      public class MyRunnableClass extends MyParentRunnableClass {
      
        @Override
        public void run() {
          doSomething();
          super.run();
        }
      
        private void doSomething() {...}
      }
      

      Relating thread of discussions : http://sonar.markmail.org/thread/cz7yd2lr574pvwsc

        Attachments

          Activity

            People

            Assignee:
            benzonico OLD - Nicolas Peru
            Reporter:
            freddy.mallet Freddy Mallet (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: