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); } }