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

S1130 RedundantThrowDeclaration does not take implicit constructor call into account

    Details

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

      Description

      public class A {
           public A() throws IllegalAccessException {
                throw new IllegalAccessException();
           }
      }
      
      public class B extends A {
           public B(String a) throws IllegalAccessException { // false positive raised because no method raising this exception is found in the body, the implicit call is not taken into consideration by the rule.
                // implicit call super constructor
                System.out.println(a);
           }
      } 

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                quentin.jaquier Quentin Jaquier
                Reporter:
                nicolas.peru Nicolas Peru
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: