changeset 6618:e8e76d50d119

issue1399: Use WKms instead of WQKms object, as W-Difference artifact themselves only deliver WKms, and no Q-Difference is ever built.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Fri, 19 Jul 2013 13:36:45 +0200
parents 67b4728723df
children 075c00b767d7
files artifacts/src/main/java/org/dive4elements/river/artifacts/states/WDifferencesState.java
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WDifferencesState.java	Fri Jul 19 10:04:47 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WDifferencesState.java	Fri Jul 19 13:36:45 2013 +0200
@@ -113,16 +113,16 @@
             logger.debug("Get WKms from WINFOArtifact");
             WINFOArtifact flys = (WINFOArtifact) d4eArtifact;
 
-            WQKms[] wqkms = (WQKms[]) flys.getWaterlevelData().
+            WKms[] wkms = (WKms[]) flys.getWaterlevelData(context).
                                               getData();
-            if (wqkms == null) {
+            if (wkms == null || wkms.length == 0) {
                 logger.warn("no waterlevels in artifact");
             }
-            else if (wqkms.length < idx+1) {
-                logger.warn("not enough waterlevels in artifact");
+            else if (wkms.length < idx+1) {
+                logger.warn("Not enough waterlevels in artifact.");
                 return new WQKms();
             }
-            return wqkms[idx];
+            return wkms[idx];
         }
         else if (d4eArtifact instanceof MINFOArtifact) {
             logger.debug("Get WKms from MINFOArtifact");

http://dive4elements.wald.intevation.org