mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
IDEA-163489 Inspection "Constant conditions & exceptions" with option "Suggest @Nullable annotation for methods" warns about lambdas
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
import java.util.Random;
|
||||
import java.util.List;
|
||||
|
||||
class TestCompilerWarnings {
|
||||
long foo(List<String> l) {
|
||||
return l.stream().map(s -> {
|
||||
if (new Random().nextInt() > 2) {
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
return s;
|
||||
}
|
||||
}).count();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user