Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/utils/RiverUtils.java @ 8351:0d3d018fc632
Never ever set current km via RiverUtils.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Wed, 01 Oct 2014 13:40:30 +0200 |
parents | e4606eae8ea5 |
children | b37cd2db9659 |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/utils/RiverUtils.java Wed Oct 01 13:37:43 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/utils/RiverUtils.java Wed Oct 01 13:40:30 2014 +0200 @@ -890,30 +890,5 @@ return q; } - /** Parses the request and checks if it contains a currentKM setting. - * If this is the case the currentKM is added to the context.*/ - public static void setKMFromRequestInContext(Document request, - CallContext context) { - Double dKm; - String km = XMLUtils.xpathString( - request, - XPATH_CHART_CURRENTKM, - ArtifactNamespaceContext.INSTANCE); - - if (km == null) { - return; - } - - try { - dKm = Double.valueOf(km); - } catch (NumberFormatException nfe) { - return; - } - - if (log.isDebugEnabled()) { - log.debug("currentKm = " + dKm); - } - context.putContextValue(CURRENT_KM, dKm); - } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :