mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-51920 'Suspicious call to Map.get' inspection should be aware of dataflow type information
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import java.lang.Integer;
|
||||
import java.util.Map;
|
||||
|
||||
class Clazz {
|
||||
void f(Map<Integer, String> map, Object o) {
|
||||
if (o instanceof Integer && map.containsKey(o)) {
|
||||
System.out.println();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+1
@@ -17,6 +17,7 @@ public class SuspiciousCollectionMethodCallsTest extends LightCodeInsightFixture
|
||||
myFixture.testHighlighting(getTestName(false) + ".java");
|
||||
}
|
||||
|
||||
public void testUseDfa() throws Exception { doTest(); }
|
||||
public void testWildcard() throws Exception { doTest(); }
|
||||
public void testIgnoreConvertible() throws Exception {
|
||||
myTool.REPORT_CONVERTIBLE_METHOD_CALLS = false;
|
||||
|
||||
Reference in New Issue
Block a user