- What language is this for?
- Java
- Which rule?
- java:S110
- Why do you believe it’s a false-positive?
- Inheriting from a JavaFX framework layout class shouldn’t trigger too deep inheritance tree warning
- There are several exceptions to the rule (according to Java static code analysis: Inheritance tree of classes should not be too deep) including javax.swing, but javafx package is not one of them
- I’m using SonarLint
- in Intellij IDEA 2023.1.2 Build #IU-231.9011.34
- SonarLint plugin version is 8.3.0.71062 (current as of writing)
- not connected to SonarQube nor SonarCloud
- How can we reproduce the problem?
import javafx.scene.layout.BorderPane;
public class ExampleClass extends BorderPane {
}
ExampleClass here raises Major Code Smell java:S110 for inheriting from javafx.scene.layout.BorderPane.
Same warning is shown for many other JavaFX layouts including HBox, Label, TextField, etc.