We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a15c25 commit e52a18cCopy full SHA for e52a18c
baseline-error-prone/src/test/java/com/palantir/baseline/errorprone/IllegalSafeLoggingLambdaTest.java
@@ -685,6 +685,23 @@ public String safeMethod(@Safe String safeArg) {
685
.doTest();
686
}
687
688
+ @Test
689
+ void testFunctionIdentityLambda() {
690
+ helper().addSourceLines(
691
+ "Test.java",
692
+ // language=Java
693
+ """
694
+ import com.palantir.logsafe.*;
695
+ import java.util.function.*;
696
+
697
+ class Test {
698
+ // BUG: Diagnostic contains: Dangerous
699
+ Function<@Unsafe String, @Safe String> func = Function.identity();
700
+ }
701
+ """)
702
+ .doTest();
703
704
705
private CompilationTestHelper helper() {
706
return CompilationTestHelper.newInstance(IllegalSafeLoggingArgument.class, getClass());
707
0 commit comments