From 481c5c51f381f28c27eeb44ea1acc2b87a4ff728 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Fri, 4 Jul 2003 08:52:44 +0000 Subject: [PATCH] Indentation changes git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274760 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/tools/ant/RuntimeConfigurable.java | 30 +++++++------- .../org/apache/tools/ant/UnknownElement.java | 39 ++++++++++--------- 2 files changed, 35 insertions(+), 34 deletions(-) diff --git a/src/main/org/apache/tools/ant/RuntimeConfigurable.java b/src/main/org/apache/tools/ant/RuntimeConfigurable.java index ff8723e5a..fb6f78c9a 100644 --- a/src/main/org/apache/tools/ant/RuntimeConfigurable.java +++ b/src/main/org/apache/tools/ant/RuntimeConfigurable.java @@ -367,23 +367,23 @@ public class RuntimeConfigurable implements Serializable { IntrospectionHelper.getHelper(p, target.getClass()); if (attributeNames != null) { - for (int i = 0; i < attributeNames.size(); i++) { - String name = (String) attributeNames.get(i); - String value = (String) attributeMap.get(name); - - // reflect these into the target - value = p.replaceProperties(value); - try { - ih.setAttribute(p, target, - name.toLowerCase(Locale.US), value); - } catch (BuildException be) { - // id attribute must be set externally - if (!name.equals("id")) { - throw be; + for (int i = 0; i < attributeNames.size(); i++) { + String name = (String) attributeNames.get(i); + String value = (String) attributeMap.get(name); + + // reflect these into the target + value = p.replaceProperties(value); + try { + ih.setAttribute(p, target, + name.toLowerCase(Locale.US), value); + } catch (BuildException be) { + // id attribute must be set externally + if (!name.equals("id")) { + throw be; + } } } - } - id = (String) attributeMap.get("id"); + id = (String) attributeMap.get("id"); } if (characters != null) { diff --git a/src/main/org/apache/tools/ant/UnknownElement.java b/src/main/org/apache/tools/ant/UnknownElement.java index c6b401222..049a44b71 100644 --- a/src/main/org/apache/tools/ant/UnknownElement.java +++ b/src/main/org/apache/tools/ant/UnknownElement.java @@ -313,28 +313,29 @@ public class UnknownElement extends Task { IntrospectionHelper ih = IntrospectionHelper.getHelper(parentClass); if (children != null) { - Iterator it = children.iterator(); - for (int i = 0; it.hasNext(); i++) { - RuntimeConfigurable childWrapper = parentWrapper.getChild(i); - UnknownElement child = (UnknownElement) it.next(); - - // backwards compatibility - element names of nested - // elements have been all lower-case in Ant, except for - // TaskContainers - if (!handleChild(ih, parent, child, - child.getTag().toLowerCase(Locale.US), - childWrapper)) { - if (!(parent instanceof TaskContainer)) { - ih.throwNotSupported(getProject(), parent, child.getTag()); - } else { - // a task container - anything could happen - just add the - // child to the container - TaskContainer container = (TaskContainer) parent; - container.addTask(child); + Iterator it = children.iterator(); + for (int i = 0; it.hasNext(); i++) { + RuntimeConfigurable childWrapper = parentWrapper.getChild(i); + UnknownElement child = (UnknownElement) it.next(); + + // backwards compatibility - element names of nested + // elements have been all lower-case in Ant, except for + // TaskContainers + if (!handleChild(ih, parent, child, + child.getTag().toLowerCase(Locale.US), + childWrapper)) { + if (!(parent instanceof TaskContainer)) { + ih.throwNotSupported(getProject(), parent, + child.getTag()); + } else { + // a task container - anything could happen - just add the + // child to the container + TaskContainer container = (TaskContainer) parent; + container.addTask(child); + } } } } - } } /**