A false positive about the rule RSPEC-2974

Hi, I found a false positive about the rule RSPEC-2974, see the code below. SonarQube should not report a warning because the annotation @Value can generate a new public constructor in the class. Hence, this is a false positive.

import lombok.Value;
@Value
public class C {
  private C() {
    // ...
  }

  public static int magic(){
    return 42;
  }
}

I find the annotation lombok.Data also leads to this false positive.

import lombok.Data;
@Data
public class C {
  private C() {
    // ...
  }

  public static int magic(){
    return 42;
  }
}

Hey there.

What version of SonarQube are you using?

Hi Colin, I use SonarQube 9.2.3.

Since SonarQube v9.2.3 is almost a year old (and has been EOL since v9.3 came out), I would suggest upgrading to v9.7 to see if the issue persists. If it does, let us know!