FP on squid:RedundantThrowsDeclarationCheck when non super constructor call

Sonar Version: 6.7.5.38563
SonarJava: 5.9.2

Description:
Superfluous throw declaration warning in child class when non super constructor call.
Child class has not default constructor.

Minimum code example:

public class A {
     public A() throws IllegalAccessException {
          throw new IllegalAccessException();
     }
}

public class B extends A {
     public B(String a) throws IllegalAccessException {
          // implicit call super constructor
          System.out.println(a);
     }
}

Thanks for the feedback and the well formatted reproducer, always appreciated !

This is indeed a false positive, ticket created to handle the issue : https://jira.sonarsource.com/browse/SONARJAVA-3148

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.