mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
Java: Add lambda-aware test detection to VisibleForTesting query
This commit is contained in:
@@ -21,11 +21,11 @@ public class Test {
|
||||
|
||||
// Lambda usage
|
||||
Runnable lambda = () -> {
|
||||
String lambdaS = Annotated.m; // $ SPURIOUS: Alert
|
||||
String lambdaS = Annotated.m; // COMPLIANT
|
||||
String lambdaS1 = Annotated.m1; // COMPLIANT
|
||||
String lambdaS2 = Annotated.m2; // COMPLIANT
|
||||
|
||||
int lambdaI = Annotated.f(); // $ SPURIOUS: Alert
|
||||
int lambdaI = Annotated.f(); // COMPLIANT
|
||||
int lambdaI2 = Annotated.fPublic(); // COMPLIANT
|
||||
int lambdaI3 = Annotated.fProtected(); // COMPLIANT
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user