mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 16:36:56 +07:00
13 lines
311 B
Java
13 lines
311 B
Java
// "Replace with 'computeIfAbsent' method call" "true"
|
|
import java.util.Map;
|
|
|
|
public class Main {
|
|
|
|
public void test(Map<String, List<String>> map, String key) {
|
|
List<String> list = map.get(key);
|
|
if (list == <caret>null) {
|
|
map.put(key, new ArrayList<>());
|
|
}
|
|
System.out.println(map);
|
|
}
|
|
} |