Browse Source

Indentation changes

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274760 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 22 years ago
parent
commit
481c5c51f3
2 changed files with 35 additions and 34 deletions
  1. +15
    -15
      src/main/org/apache/tools/ant/RuntimeConfigurable.java
  2. +20
    -19
      src/main/org/apache/tools/ant/UnknownElement.java

+ 15
- 15
src/main/org/apache/tools/ant/RuntimeConfigurable.java View File

@@ -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) {


+ 20
- 19
src/main/org/apache/tools/ant/UnknownElement.java View File

@@ -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);
}
}
}
}
}
}

/**


Loading…
Cancel
Save