From 216eddbbf8743ff53806d5485112d33eda13a631 Mon Sep 17 00:00:00 2001 From: Tagir Valeev Date: Wed, 1 Oct 2025 11:52:09 +0200 Subject: [PATCH] [java] JSpecifyConformanceAnnotationTest: update comment about catch parameter nullness Related to IDEA-377763 Intrinsically NonNull exception parameter cannot be assigned null GitOrigin-RevId: 94b3ae8452deca39d6162d926e2a457e4275212a --- .../codeInspection/JSpecifyConformanceAnnotationTest.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/java/java-tests/testSrc/com/intellij/java/codeInspection/JSpecifyConformanceAnnotationTest.java b/java/java-tests/testSrc/com/intellij/java/codeInspection/JSpecifyConformanceAnnotationTest.java index b978e3b95033..6a405aead0a6 100644 --- a/java/java-tests/testSrc/com/intellij/java/codeInspection/JSpecifyConformanceAnnotationTest.java +++ b/java/java-tests/testSrc/com/intellij/java/codeInspection/JSpecifyConformanceAnnotationTest.java @@ -92,8 +92,11 @@ public class JSpecifyConformanceAnnotationTest extends LightJavaCodeInsightFixtu private static boolean suppressWarning(@NotNull String message, String fileName, Integer offset) { Set> suppressed = Set.of( - Pair.create("Other.java", 72), // see: IDEA-377763 - Pair.create("Other.java", 70) // see: IDEA-377763 + // These two exceptions are expected: unlike JSpecify, we don't assign NotNull nullness to non-final catch parameter + // Instead, we are doing the flow analysis and may change the nullness during the variable lifetime + // See IDEA-377763 for details + Pair.create("Other.java", 72), + Pair.create("Other.java", 70) ); LineColumn column = StringUtil.offsetToLineColumn(message, offset); return suppressed.contains(Pair.create(fileName, column.line));