-
What language is this for? Java
-
Which rule? S1948
-
Why do you believe it’s a false-positive/false-negative?
Lombok @Value makes fields private. The rule raises an issue for collection fields that are not private. The rule misses that the fields are in fact private. -
Are you using
- SonarQube - community edition version 10.1
-
How can we reproduce the problem?
@Value
public class Foo implements Serializable {
Set items; // FP, field is private due to @Value
Collection moreItems; // FP
List otherItems; // FP
}