mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 11:00:04 +07:00
suspicious calls: support new Map methods (IDEA-170815)
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
class Test {
|
||||
void m(Map<String, String> map){
|
||||
map.getOrDefault(<warning descr="'Map<String, String>' may not contain objects of type 'Integer'">1</warning>, "");
|
||||
map.getOrDefault("", "");
|
||||
map.remove(<warning descr="'Map<String, String>' may not contain objects of type 'Integer'">1</warning>, "");
|
||||
map.remove("", "");
|
||||
}
|
||||
}
|
||||
+4
@@ -52,6 +52,10 @@ public class SuspiciousCollectionMethodCallsTest extends LightCodeInsightFixture
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testNewMapMethods() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testMethodReferenceWithCollectionCalls() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user