From a8dc7a86d2b6b229d13eaf1947b8f2a5bd9c3b12 Mon Sep 17 00:00:00 2001 From: Manu Sridharan Date: Wed, 4 Sep 2024 14:55:11 -0700 Subject: [PATCH 1/5] Update to Checker Framework 3.47.0 --- gradle/dependencies.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index 13263c2095..d20b6cf767 100755 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -40,7 +40,7 @@ if (project.hasProperty("epApiVersion")) { def versions = [ asm : "9.3", - checkerFramework : "3.43.0", + checkerFramework : "3.47.0", // for comparisons in other parts of the build errorProneLatest : latestErrorProneVersion, // The version of Error Prone used to check NullAway's code. From 856867cce16998ad6e8d3f8b7236c4ad996f3e9c Mon Sep 17 00:00:00 2001 From: Manu Sridharan Date: Tue, 6 Aug 2024 17:03:57 -0700 Subject: [PATCH 2/5] test case --- .../src/test/java/com/uber/nullaway/CoreTests.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/nullaway/src/test/java/com/uber/nullaway/CoreTests.java b/nullaway/src/test/java/com/uber/nullaway/CoreTests.java index f3eb4d3711..7d4435bb4f 100644 --- a/nullaway/src/test/java/com/uber/nullaway/CoreTests.java +++ b/nullaway/src/test/java/com/uber/nullaway/CoreTests.java @@ -1053,4 +1053,18 @@ public void testStaticImportFromSubclass() { "}") .doTest(); } + + @Test + public void ternaryBothCasesNull() { + defaultCompilationHelper + .addSourceLines( + "TestCase.java", + "package com.uber;", + "public class TestCase {", + " public static String foo(String x) {", + " return x.isEmpty() ? null : null;", + " }", + "}") + .doTest(); + } } From 8309843a189eb664884cd6bac5057f35c5904d4b Mon Sep 17 00:00:00 2001 From: Manu Sridharan Date: Thu, 5 Sep 2024 09:20:44 -0700 Subject: [PATCH 3/5] add @Nullable --- nullaway/src/test/java/com/uber/nullaway/CoreTests.java | 3 ++- 1 file changed, 2 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 7d4435bb4f..15d1ec68fb 100644 --- a/nullaway/src/test/java/com/uber/nullaway/CoreTests.java +++ b/nullaway/src/test/java/com/uber/nullaway/CoreTests.java @@ -1060,8 +1060,9 @@ public void ternaryBothCasesNull() { .addSourceLines( "TestCase.java", "package com.uber;", + "import org.jspecify.annotations.Nullable;", "public class TestCase {", - " public static String foo(String x) {", + " public static @Nullable String foo(String x) {", " return x.isEmpty() ? null : null;", " }", "}") From 803e783392d27a1039fb0bd3e856fc4abb2f8873 Mon Sep 17 00:00:00 2001 From: Manu Sridharan Date: Wed, 2 Oct 2024 11:05:44 -0700 Subject: [PATCH 4/5] 3.48.0 --- gradle/dependencies.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index d6626a7de8..76de418ec4 100755 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -40,7 +40,7 @@ if (project.hasProperty("epApiVersion")) { def versions = [ asm : "9.3", - checkerFramework : "3.47.0", + checkerFramework : "3.48.0", // for comparisons in other parts of the build errorProneLatest : latestErrorProneVersion, // The version of Error Prone used to check NullAway's code. From 2d095070fc4f0d9502b61982bea78796c1f1c291 Mon Sep 17 00:00:00 2001 From: Manu Sridharan Date: Wed, 2 Oct 2024 11:08:18 -0700 Subject: [PATCH 5/5] comment --- nullaway/src/test/java/com/uber/nullaway/CoreTests.java | 1 + 1 file changed, 1 insertion(+) diff --git a/nullaway/src/test/java/com/uber/nullaway/CoreTests.java b/nullaway/src/test/java/com/uber/nullaway/CoreTests.java index 15d1ec68fb..a851d8efb2 100644 --- a/nullaway/src/test/java/com/uber/nullaway/CoreTests.java +++ b/nullaway/src/test/java/com/uber/nullaway/CoreTests.java @@ -1054,6 +1054,7 @@ public void testStaticImportFromSubclass() { .doTest(); } + /** testing for no Checker Framework crash */ @Test public void ternaryBothCasesNull() { defaultCompilationHelper