[PATCH 1 of 2] Remove duplicated code

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


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1427304154 -3600
# Node ID b8493c4bdf0cc4fc7d5e2527c081daef430a159e
# Parent  594b0bbc7011523c710a6007d4ac4cf3f90511c5
Remove duplicated code.

    This is an exact copy of the createItem method from the base class.

diff -r 594b0bbc7011 -r b8493c4bdf0c artifacts/src/main/java/org/dive4elements/river/artifacts/states/ComputationRangeState.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ComputationRangeState.java	Wed Mar 25 18:12:16 2015 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ComputationRangeState.java	Wed Mar 25 18:22:34 2015 +0100
@@ -121,24 +121,6 @@
 
     }
 
-
-    protected Element createItem(XMLUtils.ElementCreator cr, Object obj) {
-        Element item  = ProtocolUtils.createArtNode(cr, "item", null, null);
-        Element label = ProtocolUtils.createArtNode(cr, "label", null, null);
-        Element value = ProtocolUtils.createArtNode(cr, "value", null, null);
-
-        String[] arr = (String[]) obj;
-
-        label.setTextContent(arr[0]);
-        value.setTextContent(arr[1]);
-
-        item.appendChild(label);
-        item.appendChild(value);
-
-        return item;
-    }
-
-
     @Override
     protected double[] getMinMax(Artifact artifact) {
         D4EArtifact flysArtifact = (D4EArtifact) artifact;


More information about the Dive4Elements-commits mailing list