IDEA-146009 Good code is yellow: "Unboxing may produce NPE" inside forEach lambda

This commit is contained in:
peter
2015-10-06 15:24:36 +02:00
parent ebe3adb0e8
commit 06c0f35c8f
3 changed files with 14 additions and 0 deletions
@@ -0,0 +1,11 @@
import java.util.List;
class Example {
public void example(List<Foo> foos) {
foos.forEach(foo -> foo.bar = null);
}
}
class Foo {
public Long bar;
}