private String tokenForPlace(Place newPlace) { if (defaultPlace.equals(newPlace)) { return ""; } String token = mapper.getToken(newPlace); if (token != null) { return token; } log().warning("Place not mapped to a token: " + newPlace); return ""; }
private void handleHistoryToken(String token) { Place newPlace = null; if ("".equals(token)) { newPlace = defaultPlace; } if (newPlace == null) { newPlace = mapper.getPlace(token); } if (newPlace == null) { log().warning("Unrecognized history token: " + token); newPlace = errorPlace; } placeController.goTo(newPlace); }