- SonarLint for Eclipse 7.1.0.39158
- Eclipse 2021-09 (4.21.0), build id: 20210910-1417
- openjdk version “16.0.2” 2021-07-20, OpenJDK 64-Bit Server VM Temurin-16.0.2+7 (build 16.0.2+7, mixed mode, sharing)
Similar to #43385 parameters of local records (inside a method) are marked as unused regardless of whether they are used or not and give a false-positive for java:S1481
class S1481LocalRecord {
void test() {
record Foo(int unused) {}
int a = new Foo(1).unused;
int b = new Foo(1).unused();
}
}