From cddd77b446f4613a5590f9d15eef8a0e8fec098c Mon Sep 17 00:00:00 2001 From: Manu Sridharan Date: Wed, 9 Oct 2024 15:35:15 -0700 Subject: [PATCH] minor tweaks to tests --- .../java/com/uber/nullaway/TypeUseAnnotationsTests.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/nullaway/src/test/java/com/uber/nullaway/TypeUseAnnotationsTests.java b/nullaway/src/test/java/com/uber/nullaway/TypeUseAnnotationsTests.java index 2bee712cf2..745f8c8652 100644 --- a/nullaway/src/test/java/com/uber/nullaway/TypeUseAnnotationsTests.java +++ b/nullaway/src/test/java/com/uber/nullaway/TypeUseAnnotationsTests.java @@ -126,8 +126,8 @@ public void annotationAppliedToInnerTypeExplicitly() { "import org.checkerframework.checker.nullness.qual.Nullable;", "class Test {", " Test.@Nullable Foo f1;", - " // @Nullable does not apply to the inner type", - " // BUG: Diagnostic contains: @NonNull field f2 not initialized", + " // @Nullable does not apply to the inner type", + " // BUG: Diagnostic contains: @NonNull field f2 not initialized", " @Nullable Test.Foo f2;", " class Foo { }", " public void test() {", @@ -202,7 +202,7 @@ public void typeUseAnnotationOnInnerMultiLevel() { " A.@Nullable B.C foo2 = null;", " A.B.@Nullable C foo3 = null;", " // BUG: Diagnostic contains: Type-use nullability annotations should be applied on inner class", - " @Nullable A.B foo4 = null;", + " @Nullable A.B foo4 = null;", " // BUG: Diagnostic contains: assigning @Nullable expression to @NonNull field", " A.B.@Nullable C [][] foo5 = null;", " A.B.C @Nullable [][] foo6 = null;", @@ -317,7 +317,6 @@ public void typeUseAnnotationOnMethodReturnType() { " // BUG: Diagnostic contains: Type-use nullability annotations should be applied on inner class", " public @Nullable A.B method4() { return null; }", " public @Nullable A method5() { return null; }", - " public @Nullable int method6() { return 0; }", "}") .doTest(); }