- Operating system: Ubuntu 24.04
- SonarLint plugin version: 10.14.0.80203
- IntelliJ version: IntelliJ IDEA 2024.3.1 (Ultimate Edition)
- Programming language you’re coding in: Java 21
- Is connected mode used: No
And a thorough description of the problem / question:
Rule java:S4449 is triggered for a nullable parameter on a record while the Nullable annotation exists.
When you try to pass a nullable value for parameter paraTwo, you still get a warning for this rule.
import javax.annotation.Nullable;
import javax.annotation.ParametersAreNonnullByDefault
@ParametersAreNonnullByDefault
public record SomeRecord(SomeClass paraOne, @Nullable SomeClass paraTwo) {
}