summaryrefslogtreecommitdiff
path: root/java/java-tests/testData/inspection/dataFlow/fixture/CustomTypeQualifierDefault.java
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2014-08-19 22:27:03 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-08-19 21:25:05 +0000
commit4ca751c002784c4bfd349cc5240b045b62277c80 (patch)
treedfc17b31990e2429535609b85f6d080c4fa0d9fe /java/java-tests/testData/inspection/dataFlow/fixture/CustomTypeQualifierDefault.java
parent890d9a2952301682ffecaed4495f5f65c84c3642 (diff)
parent060e58b3afea3ea39f5ba1cb5a443ca3ebda28c8 (diff)
downloadidea-4ca751c002784c4bfd349cc5240b045b62277c80.tar.gz
Merge "Merge remote-tracking branch 'aosp/upstream-master' into merge"
Diffstat (limited to 'java/java-tests/testData/inspection/dataFlow/fixture/CustomTypeQualifierDefault.java')
-rw-r--r--java/java-tests/testData/inspection/dataFlow/fixture/CustomTypeQualifierDefault.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/java/java-tests/testData/inspection/dataFlow/fixture/CustomTypeQualifierDefault.java b/java/java-tests/testData/inspection/dataFlow/fixture/CustomTypeQualifierDefault.java
new file mode 100644
index 000000000000..e9ec6b1dbe11
--- /dev/null
+++ b/java/java-tests/testData/inspection/dataFlow/fixture/CustomTypeQualifierDefault.java
@@ -0,0 +1,25 @@
+import foo.*;
+import org.jetbrains.annotations.NotNull;
+
+class Some {
+ void foo(@NotNull String s) {
+ NotNullClass.foo(null);
+ if (<warning descr="Condition 'NotNullClass.foo(s) == null' is always 'false'">NotNullClass.foo(s) == null</warning>) {}
+
+ NullableClass.foo(null);
+ if (NullableClass.foo("a") == null) {}
+
+ AnotherPackageNotNull.foo(null);
+ if (<warning descr="Condition 'AnotherPackageNotNull.foo(s) == null' is always 'false'">AnotherPackageNotNull.foo(s) == null</warning>) {}
+ }
+
+}
+
+@bar.MethodsAreNotNullByDefault
+class NotNullClass {
+ static native Object foo(String s);
+
+}
+class NullableClass {
+ static native Object foo(String s);
+} \ No newline at end of file