False positive from java:S1105 in record containing class or interface

Hello,

  • What language is this for? Java
  • Which rule? S1105
  • Why do you believe it’s a false-positive/false-negative? formatting is OK
  • Are you using
    • SonarCloud? No
    • SonarQube - which version? Yes, 9.9.1
    • SonarLint - which IDE/version? Yes, 7.13 in Eclipse
      • in connected mode with SonarQube or SonarCloud? yes
  • How can we reproduce the problem? Give us a self-contained snippet of code (formatted text, no screenshots)
record S1105FalsePositive(Object o) {

    public String first() {
        return o.toString();
    }

    public String second() {
        return o.toString();
    }

    public interface Inner {
    }
}

If Inner is removed, or moved before the methods, then no issue is reported.

Thanks
Vivien