@Override public MappingResult mapURI(String uri) { MappingResult result = super.mapURI(uri); if (result != null) { String destination = toURI; String hostMapping = this.tryToMapHost(); if (hostMapping != null) { destination = hostMapping; } result.setToURI(destination); return result; } return null; }