mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java-inspections] IDEA-377301 improve jspecify nullability tests
- conformance tests, update to the last jspecify tests GitOrigin-RevId: 4c743ceb61fe0bdd9ff90867163a37555c25c2cf
This commit is contained in:
committed by
intellij-monorepo-bot
parent
fe36cbe99f
commit
732b17bc67
+1
-1
@@ -87,7 +87,7 @@ public class Other {
|
||||
try (@Nullable AutoCloseable a = () -> {}) {}
|
||||
// test:name:NonNull try-with-resources
|
||||
// test:irrelevant-annotation:NonNull
|
||||
try (@Nullable AutoCloseable a = () -> {}) {}
|
||||
try (@NonNull AutoCloseable a = () -> {}) {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -87,7 +87,7 @@ public class Other {
|
||||
try (@Nullable AutoCloseable a = () -> {}) {}
|
||||
// test:name:NonNull try-with-resources
|
||||
// test:irrelevant-annotation:NonNull
|
||||
try (@Nullable AutoCloseable a = () -> {}) {}
|
||||
try (@NonNull AutoCloseable a = () -> {}) {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -89,7 +89,7 @@ public class Other {
|
||||
try (@Nullable AutoCloseable a = () -> {}) {}
|
||||
// test:name:NonNull try-with-resources
|
||||
// test:irrelevant-annotation:NonNull
|
||||
try (@Nullable AutoCloseable a = () -> {}) {}
|
||||
try (@NonNull AutoCloseable a = () -> {}) {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
-9
@@ -178,15 +178,6 @@ public class JSpecifyConformanceAnnotationTest extends LightJavaCodeInsightFixtu
|
||||
Pattern.compile("// test:irrelevant[^\\r\\n]*\n *// test:irrelevant.*\n");
|
||||
|
||||
private static @NotNull String clean(@NotNull String text, String fileName) {
|
||||
//it is a bug in tests
|
||||
text = text.replaceAll(Pattern.quote("""
|
||||
// test:irrelevant-annotation:NonNull
|
||||
try (@Nullable AutoCloseable a = () -> {}) {}
|
||||
"""),
|
||||
"""
|
||||
// test:irrelevant-annotation:NonNull
|
||||
try (@NonNull AutoCloseable a = () -> {}) {}
|
||||
""");
|
||||
text = JOIN_TEST_IRRELEVANT_ANNOTATIONS.matcher(text)
|
||||
.replaceAll("// test:irrelevant-annotation:Nullable & test:irrelevant-annotation:NonNull\n");
|
||||
text = CANNOT_CONVERT.matcher(text).replaceAll("// jspecify_nullness_mismatch\n");
|
||||
|
||||
Reference in New Issue
Block a user