Mercurial > dive4elements > river
changeset 5293:8aae8c26844f
merge
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 14 Mar 2013 12:44:04 +0100 |
parents | 3dc4c2798212 (current diff) 394841a66c14 (diff) |
children | 3f35d9db48c1 |
files | |
diffstat | 1 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/MainValuesArtifact.java Thu Mar 14 12:30:22 2013 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/MainValuesArtifact.java Thu Mar 14 12:44:04 2013 +0100 @@ -175,14 +175,15 @@ logger.debug("MainValuesArtifact.initialize"); FLYSArtifact winfo = (FLYSArtifact) artifact; RangeAccess rangeAccess = new RangeAccess(winfo, null); - double [] locations = rangeAccess.getLocations(); + double [] locations = rangeAccess.getKmRange(); + if (locations != null) { double location = locations[0]; addData("ld_locations", new DefaultStateData("ld_locations", null, null, String.valueOf(location))); } else { - logger.warn("No location for mainvalues given."); + logger.error("No location for mainvalues given."); } importData(winfo, "river"); } @@ -247,7 +248,13 @@ // TODO use helper to get location as double String locationStr = getDataAsString("ld_locations"); - if (river == null || locationStr == null) { + if (river == null) { + logger.error("River is null"); + return null; + } + + if (locationStr == null) { + logger.error("Locationstr is null"); return null; }