mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-30 21:57:41 +07:00
GitOrigin-RevId: 088ce28eb3b8cbbce9aa1cfc1b073fef2dab12ce
16 lines
416 B
Java
16 lines
416 B
Java
// "Replace with 'getOrDefault()' call" "true"
|
|
import java.util.Map;
|
|
|
|
public class Main {
|
|
private static final String NONE = "none";
|
|
|
|
private String str;
|
|
|
|
public void testGetOrDefault(Map<String, String> map, String key, Main other) {
|
|
if(map.conta<caret>insKey("k")) {
|
|
System.out.println(/* output map value */ map.get("k"));
|
|
} else {
|
|
System.out.println(/* output none */ NONE);
|
|
}
|
|
}
|
|
} |