changeset 3731:e32b822f3cfa

Simplified code. flys-artifacts/trunk@5404 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Sat, 08 Sep 2012 15:27:21 +0000
parents 487a8cb4a222
children fe29b0226faf
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/themes/DefaultThemeField.java
diffstat 2 files changed, 7 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Sat Sep 08 14:42:16 2012 +0000
+++ b/flys-artifacts/ChangeLog	Sat Sep 08 15:27:21 2012 +0000
@@ -1,3 +1,8 @@
+2012-09-08	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	* src/main/java/de/intevation/flys/themes/DefaultThemeField.java:
+	  Simplified code.
+
 2012-09-08	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/states/fixation/FixAnalysisCompute.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/themes/DefaultThemeField.java	Sat Sep 08 14:42:16 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/themes/DefaultThemeField.java	Sat Sep 08 15:27:21 2012 +0000
@@ -1,7 +1,6 @@
 package de.intevation.flys.themes;
 
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.Map;
 
 import org.w3c.dom.Document;
@@ -68,13 +67,8 @@
 
         Element field = cr.create("field");
 
-        Iterator<String> iter = attr.keySet().iterator();
-
-        while (iter.hasNext()) {
-            String name  = iter.next();
-            String value = (String) getAttribute(name);
-
-            cr.addAttr(field, name, value);
+        for (Map.Entry<String, Object> entry: attr.entrySet()) {
+            cr.addAttr(field, entry.getKey(), (String)entry.getValue());
         }
 
         doc.appendChild(field);

http://dive4elements.wald.intevation.org