aboutsummaryrefslogtreecommitdiff
path: root/checker-framework
diff options
context:
space:
mode:
authorKristen Kozak <sebright@google.com>2017-12-28 12:27:22 -0800
committerKristen Kozak <sebright@google.com>2017-12-30 19:53:44 -0800
commit3c526065eb3b7e713475c11226a5e2d8a8f0826e (patch)
tree36683ebef383b37544ff0d951ab32e356de4b627 /checker-framework
parent1049f48ff933720506a70099bea8f9df23e2d993 (diff)
downloadopencensus-java-3c526065eb3b7e713475c11226a5e2d8a8f0826e.tar.gz
Add Checker Framework stub file for Guava (fixes #920).
This commit adds a stub file as described in https://checkerframework.org/manual/#stub. The initial file contains annotations for com.google.common.base.Strings.isNullOrEmpty.
Diffstat (limited to 'checker-framework')
-rw-r--r--checker-framework/stubs/guava.astub9
1 files changed, 9 insertions, 0 deletions
diff --git a/checker-framework/stubs/guava.astub b/checker-framework/stubs/guava.astub
new file mode 100644
index 00000000..ff7a795d
--- /dev/null
+++ b/checker-framework/stubs/guava.astub
@@ -0,0 +1,9 @@
+import org.checkerframework.checker.nullness.qual.EnsuresNonNullIf;
+import org.checkerframework.checker.nullness.qual.Nullable;
+
+package com.google.common.base;
+
+class Strings {
+ @EnsuresNonNullIf(result = false, expression = "#1")
+ static boolean isNullOrEmpty(@Nullable String str);
+}