[PATCH 3 of 4] Explicitely checking for ld_step, in order to misuse this component (i.e. if there are additional data items)

Wald Commits scm-commit at wald.intevation.org
Tue Jul 17 19:48:36 CEST 2018


# HG changeset patch
# User gernotbelger
# Date 1531849703 -7200
# Node ID baef46792354ad076e29e58ea3c11a622d6e178e
# Parent  abf14917be32342903492834851988cc4780fffc
Explicitely checking for ld_step, in order to misuse this component (i.e. if there are additional data items)

diff -r abf14917be32 -r baef46792354 artifacts/src/main/java/org/dive4elements/river/artifacts/states/ComputationRangeState.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ComputationRangeState.java	Tue Jul 17 19:48:18 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ComputationRangeState.java	Tue Jul 17 19:48:23 2018 +0200
@@ -88,11 +88,12 @@
             final Element max = createItem(cr, new String[] { "max", new Double(maxVal).toString() });
 
             return new Element[] { max };
-        } else {
+        } else if (name.contentEquals("ld_step")) {
             final Element step = createItem(cr, new String[] { "step", String.valueOf(getDefaultStep()) });
             return new Element[] { step };
+        } else {
+            return new Element[] {};
         }
-
     }
 
     @Override


More information about the Dive4Elements-commits mailing list