Browse Source

linelength and 1.5 bootstrap whining

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@481763 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 18 years ago
parent
commit
912d48e591
2 changed files with 11 additions and 5 deletions
  1. +5
    -2
      src/main/org/apache/tools/ant/IntrospectionHelper.java
  2. +6
    -3
      src/main/org/apache/tools/ant/taskdefs/AntStructure.java

+ 5
- 2
src/main/org/apache/tools/ant/IntrospectionHelper.java View File

@@ -1008,7 +1008,8 @@ public final class IntrospectionHelper {
}
}
};
} else if (reflectedArg.getSuperclass() != null && reflectedArg.getSuperclass().getName().equals("java.lang.Enum")) {
} else if (reflectedArg.getSuperclass() != null
&& reflectedArg.getSuperclass().getName().equals("java.lang.Enum")) {
return new AttributeSetter(m) {
public void set(Project p, Object parent, String value)
throws InvocationTargetException, IllegalAccessException, BuildException {
@@ -1018,7 +1019,9 @@ public final class IntrospectionHelper {
invoke(null, new Object[] {value})});
} catch (InvocationTargetException x) {
if (x.getTargetException() instanceof IllegalArgumentException) {
throw new BuildException("'" + value + "' is not a permitted value for " + reflectedArg.getName());
throw new BuildException(
"'" + value + "' is not a permitted value for "
+ reflectedArg.getName());
} else {
throw new BuildException(x.getTargetException());
}


+ 6
- 3
src/main/org/apache/tools/ant/taskdefs/AntStructure.java View File

@@ -370,9 +370,11 @@ public class AntStructure extends Task {
} catch (IllegalAccessException ie) {
sb.append("CDATA ");
}
} else if (type.getSuperclass() != null && type.getSuperclass().getName().equals("java.lang.Enum")) {
} else if (type.getSuperclass() != null
&& type.getSuperclass().getName().equals("java.lang.Enum")) {
try {
Object[] values = (Object[]) type.getMethod("values", null).invoke(null, null);
Object[] values = (Object[]) type.getMethod("values", (Class[]) null)
.invoke(null, (Object[]) null);
if (values.length == 0) {
sb.append("CDATA ");
} else {
@@ -381,7 +383,8 @@ public class AntStructure extends Task {
if (i != 0) {
sb.append(" | ");
}
sb.append(type.getMethod("name", null).invoke(values[i], null));
sb.append(type.getMethod("name", (Class[]) null)
.invoke(values[i], (Object[]) null));
}
sb.append(") ");
}


Loading…
Cancel
Save