diff options
author | Liam Miller-Cushon <cushon@google.com> | 2021-05-21 15:13:54 -0700 |
---|---|---|
committer | Javac Team <javac-team+copybara@google.com> | 2021-05-21 15:14:24 -0700 |
commit | e0d9619c0b1a077e10f21e20947d318fa0987208 (patch) | |
tree | 5a91292d2423d6621791316fc21a519305569353 /javatests/com/google/turbine/binder/bytecode/BytecodeBoundClassTest.java | |
parent | db341bf77802d683f52ffc0fc68f433c6d954446 (diff) | |
download | turbine-e0d9619c0b1a077e10f21e20947d318fa0987208.tar.gz |
Satisfy the nullness checker
PiperOrigin-RevId: 375173482
Diffstat (limited to 'javatests/com/google/turbine/binder/bytecode/BytecodeBoundClassTest.java')
-rw-r--r-- | javatests/com/google/turbine/binder/bytecode/BytecodeBoundClassTest.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/javatests/com/google/turbine/binder/bytecode/BytecodeBoundClassTest.java b/javatests/com/google/turbine/binder/bytecode/BytecodeBoundClassTest.java index cdbc0ad..ec2ebbf 100644 --- a/javatests/com/google/turbine/binder/bytecode/BytecodeBoundClassTest.java +++ b/javatests/com/google/turbine/binder/bytecode/BytecodeBoundClassTest.java @@ -42,6 +42,7 @@ import java.io.UncheckedIOException; import java.util.HashMap; import java.util.List; import java.util.Map; +import org.checkerframework.checker.nullness.qual.Nullable; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -83,9 +84,11 @@ public class BytecodeBoundClassTest { .isEqualTo(new ClassSymbol("java/lang/String")); } + @SuppressWarnings({"deprecation", "TypeNameShadowing", "InlineMeSuggester"}) static class HasMethod { @Deprecated - <X, Y extends X, Z extends Throwable> X foo(@Deprecated X bar, Y baz) throws IOException, Z { + <X, Y extends X, Z extends Throwable> @Nullable X foo(@Deprecated X bar, Y baz) + throws IOException, Z { return null; } @@ -216,7 +219,7 @@ public class BytecodeBoundClassTest { .append( new Env<ClassSymbol, BytecodeBoundClass>() { @Override - public BytecodeBoundClass get(ClassSymbol sym) { + public @Nullable BytecodeBoundClass get(ClassSymbol sym) { return map.get(sym); } }); |