blob: 0c7220144b4eefa47c32f1ee5aeffdf466d6744b [file]
// "Replace with 'getOrDefault' method call" "false"
import java.util.Map;
public class Main {
public CharSequence test(Map<String, ? extends CharSequence> map) {
// cannot replace as map.getOrDefault("xyz", "none") will result in compilation error
if(map.co<caret>ntainsKey("xyz")) {
return map.get("xyz");
} else {
return "none";
}
}
}