mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 16:36:56 +07:00
16 lines
337 B
Java
16 lines
337 B
Java
// "Replace with 'putIfAbsent' method call" "false"
|
|
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
public class Main {
|
|
public static void main(String[] args) {
|
|
Map<String, String> vals = new HashMap<>();
|
|
String v = vals.get("foo");
|
|
if(v <caret>== null) {
|
|
vals.put("foo", v);
|
|
}
|
|
System.out.println(v);
|
|
}
|
|
}
|