# HG changeset patch # User Sascha L. Teichmann # Date 1347118041 0 # Node ID e32b822f3cfae1f1e79c0a889f1da65f6f6117d5 # Parent 487a8cb4a222e388433e4ceacbc5511ac36a18a8 Simplified code. flys-artifacts/trunk@5404 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 487a8cb4a222 -r e32b822f3cfa flys-artifacts/ChangeLog --- 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 + + * src/main/java/de/intevation/flys/themes/DefaultThemeField.java: + Simplified code. + 2012-09-08 Sascha L. Teichmann * src/main/java/de/intevation/flys/artifacts/states/fixation/FixAnalysisCompute.java: diff -r 487a8cb4a222 -r e32b822f3cfa flys-artifacts/src/main/java/de/intevation/flys/themes/DefaultThemeField.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 iter = attr.keySet().iterator(); - - while (iter.hasNext()) { - String name = iter.next(); - String value = (String) getAttribute(name); - - cr.addAttr(field, name, value); + for (Map.Entry entry: attr.entrySet()) { + cr.addAttr(field, entry.getKey(), (String)entry.getValue()); } doc.appendChild(field);