From 95bdafa286434ffdb56bcce4a6f9c5c17d9cfb56 Mon Sep 17 00:00:00 2001 From: Anna Kozlova Date: Thu, 1 Nov 2012 19:05:00 +0100 Subject: [PATCH] testdata for IDEA-21432 --- .../UncheckedWarningIDEA21432.java | 23 +++++++++++++++++++ .../daemon/LightAdvHighlightingJdk7Test.java | 1 + 2 files changed, 24 insertions(+) create mode 100644 java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/UncheckedWarningIDEA21432.java diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/UncheckedWarningIDEA21432.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/UncheckedWarningIDEA21432.java new file mode 100644 index 000000000000..7cb66c4f68cf --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/UncheckedWarningIDEA21432.java @@ -0,0 +1,23 @@ + +import java.util.Map; + +public class MissingWarning { + + static final Map VALID_VALUES_BY_KEY = newExceptionOnNullHashMap( + "Invalid key", + newEntry("key1", "valA"), // <<--- compiler warning on this line + newEntry("key2", "valB"), + newEntry("key3", "valC"), + newEntry("key4", "valD") + ); + + public static Map newExceptionOnNullHashMap(final String exceptionMessage, + Map.Entry... entries) + { + return null; + } + + public static Map.Entry newEntry(K key, V value) { + return null; + } +} \ No newline at end of file diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/LightAdvHighlightingJdk7Test.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/LightAdvHighlightingJdk7Test.java index 493d4f01c27a..e597ac96ea10 100644 --- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/LightAdvHighlightingJdk7Test.java +++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/LightAdvHighlightingJdk7Test.java @@ -168,4 +168,5 @@ public class LightAdvHighlightingJdk7Test extends LightDaemonAnalyzerTestCase { public void testUncheckedWarningIDEA59290() throws Exception { doTest(true, false); } public void testUncheckedWarningIDEA70620() throws Exception { doTest(true, false); } public void testUncheckedWarningIDEA60166() throws Exception { doTest(true, false); } + public void testUncheckedWarningIDEA21432() throws Exception { doTest(true, false); } }