IDEA-124359 Add Inspection for detecting nullable values passed into Optional.of()

test that it correctly works with Guava
This commit is contained in:
peter
2015-04-14 23:12:39 +03:00
parent 1b7a05e26f
commit 6c8750291f
4 changed files with 43 additions and 14 deletions
@@ -0,0 +1,6 @@
// "Replace with '.fromNullable()'" "true"
class A{
void test(){
com.google.common.base.Optional.fromNullable(n<caret>ull);
}
}
@@ -0,0 +1,6 @@
// "Replace with '.fromNullable()'" "true"
class A{
void test(){
com.google.common.base.Optional.of(n<caret>ull);
}
}