inspection to detect code replacable with putIfAbsent is rewritten

This commit is contained in:
Dmitry Batkovich
2016-02-05 12:59:00 +03:00
parent 1668d7132f
commit 84320f8d70
14 changed files with 514 additions and 3 deletions
@@ -0,0 +1,7 @@
// "Replace with 'putIfAbsent' method call" "true"
import java.util.Map;
class Test {
void m1111(Map<String, Integer> map) {
int i = !map.containsKey("asd") ? map.<caret>put("asd", 123) : map.get("asd");
}
}