don't infer ->null contracts in scope of @MethodAreNonNullByDefault (addendum to IDEA-160991)

This commit is contained in:
peter
2016-09-21 10:50:31 +02:00
parent 54fabc098c
commit b571394209
2 changed files with 7 additions and 2 deletions
@@ -24,10 +24,15 @@ class NotNullClass {
return <warning descr="'null' is returned by the method declared as @MethodsAreNotNullByDefault">null</warning>;
}
private Object privateFoo() {
private String privateFoo() {
return <warning descr="'null' is returned by the method declared as @MethodsAreNotNullByDefault">null</warning>;
}
{
String s2 = privateFoo();
int i2 = s2.length();
}
@Nullable
public Object foo2() {
return null;