以下のコードの 5 行目を確認してください。また、質問が間違っている場合は修正してください。
public class Location {
private final Map<String, Integer> exits;
public Location(Map<String, Integer> exits) {
if(exits != null) {
this.exits = new HashMap<String, Integer>(exits);
} else {
this.exits = new HashMap<String, Integer>();
}
}
}