mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
10 lines
269 B
Java
10 lines
269 B
Java
// "Use 'computeIfAbsent' method with functional argument" "false"
|
|
|
|
import java.util.*;
|
|
|
|
class Test {
|
|
public void test(Map<String, List<Integer>> map, String key) {
|
|
List<Integer> old = map.putIfAbsent(key, new ArrayL<caret>ist<>());
|
|
map.get(key).add(0);
|
|
}
|
|
} |