mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 16:36:56 +07:00
14 lines
258 B
Java
14 lines
258 B
Java
// "Replace with 'putIfAbsent' method call" "true"
|
|
import java.util.Map;
|
|
|
|
class Test{
|
|
|
|
Integer m2(Map<String, Integer> map) {
|
|
if (!map.conta<caret>insKey("asd")) {
|
|
return map.put("asd", 123);
|
|
} else {
|
|
return map.get("asd");
|
|
}
|
|
}
|
|
|
|
} |