From 06f11c24dc4c0f9af48f802f89771630091b8bc5 Mon Sep 17 00:00:00 2001 From: Manu Sridharan Date: Sat, 21 Dec 2024 20:15:51 -0500 Subject: [PATCH] test coverage --- nullaway/src/test/java/com/uber/nullaway/CoreTests.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nullaway/src/test/java/com/uber/nullaway/CoreTests.java b/nullaway/src/test/java/com/uber/nullaway/CoreTests.java index 568f61002e..f475b37128 100644 --- a/nullaway/src/test/java/com/uber/nullaway/CoreTests.java +++ b/nullaway/src/test/java/com/uber/nullaway/CoreTests.java @@ -1080,10 +1080,13 @@ public void synchronizedDeref() { "package com.uber;", "import org.jspecify.annotations.Nullable;", "public class TestCase {", - " public static void foo(@Nullable Object lock) {", + " public static void testPositive(@Nullable Object lock) {", " // BUG: Diagnostic contains: synchronized block expression \"lock\" is @Nullable", " synchronized (lock) {}", " }", + " public static void testNegative(Object lock) {", + " synchronized (lock) {}", + " }", "}") .doTest(); }