[PATCH 2 of 2] Remove another obsolete check for an unused (and removed) config value

Wald Commits scm-commit at wald.intevation.org
Wed Mar 25 18:23:55 CET 2015


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1427304202 -3600
# Node ID 42fc26e463dbf1d1634fb11b8f2081a3c9d067e2
# Parent  b8493c4bdf0cc4fc7d5e2527c081daef430a159e
Remove another obsolete check for an unused (and removed) config value

diff -r b8493c4bdf0c -r 42fc26e463db artifacts/src/main/java/org/dive4elements/river/artifacts/states/MinMaxState.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/MinMaxState.java	Wed Mar 25 18:22:34 2015 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/MinMaxState.java	Wed Mar 25 18:23:22 2015 +0100
@@ -47,7 +47,7 @@
             "art:type",
             getType());
 
-        String[] defMinMax = getDefaults(artifact, name);
+        String[] defMinMax = getMinMaxDefaults(artifact, name);
 
         Element min = ProtocolUtils.createArtNode(
             creator,
@@ -107,30 +107,6 @@
 
 
     /**
-     * This method returns the default values for min and max. If the static
-     * field DefaultState.USE_DEFAULTS is set, the minimum and maximum inserted
-     * by the user is returned as string. Otherwise, the absolute minimum and
-     * maximum are returned.
-     *
-     * @param artifact The D4EArtifact.
-     * @param name The name of the parameter.
-     *
-     * @return a string array [min,max] that contains the minimum and maximum
-     * values for the parameter <i>name</i>.
-     */
-    protected String[] getDefaults(Artifact artifact, String name) {
-        if (DefaultState.USE_DEFAULTS) {
-            String[] tmp = getMinMaxByParameter(artifact, name);
-
-            return tmp != null ? tmp : getMinMaxDefaults(artifact, name);
-        }
-        else {
-            return getMinMaxDefaults(artifact, name);
-        }
-    }
-
-
-    /**
      * Returns a string array with minimum and maximum inserted by the user as
      * [min,max].
      *


More information about the Dive4Elements-commits mailing list