Please check line 5 of the code below. And also please correct my question if it's wrong.
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>();
}
}
}