git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@354101 13f79535-47bb-0310-9956-ffa450edef68master
@@ -599,7 +599,7 @@ public class TaskTagsHandler extends XDocletTagSupport | |||||
attributeMethods.add(method); | attributeMethods.add(method); | ||||
} | } | ||||
return (XMethod[]) attributeMethods.toArray(new XMethod[0]); | |||||
return (XMethod[]) attributeMethods.toArray(new XMethod[attributeMethods.size()]); | |||||
} | } | ||||
/** | /** | ||||
@@ -708,7 +708,7 @@ public class TaskTagsHandler extends XDocletTagSupport | |||||
elementMethods.add(method); | elementMethods.add(method); | ||||
} | } | ||||
return (XMethod[]) elementMethods.toArray(new XMethod[0]); | |||||
return (XMethod[]) elementMethods.toArray(new XMethod[elementMethods.size()]); | |||||
} | } | ||||
/** | /** | ||||
@@ -849,7 +849,7 @@ public class TaskTagsHandler extends XDocletTagSupport | |||||
} | } | ||||
}); | }); | ||||
return (XMethod[]) methods.toArray(new XMethod[0]); | |||||
return (XMethod[]) methods.toArray(new XMethod[methods.size()]); | |||||
} | } | ||||
} | } | ||||
@@ -91,7 +91,7 @@ public class CommandlineJava implements Cloneable { | |||||
if (definitions.size() == 0) { | if (definitions.size() == 0) { | ||||
return null; | return null; | ||||
} else { | } else { | ||||
return (String[]) definitions.toArray(new String[0]); | |||||
return (String[]) definitions.toArray(new String[definitions.size()]); | |||||
} | } | ||||
} | } | ||||
@@ -397,7 +397,7 @@ public class CommandlineJava implements Cloneable { | |||||
//fill it | //fill it | ||||
addCommandsToList(listIterator); | addCommandsToList(listIterator); | ||||
//convert to an array | //convert to an array | ||||
return (String[]) commands.toArray(new String[0]); | |||||
return (String[]) commands.toArray(new String[commands.size()]); | |||||
} | } | ||||
/** | /** | ||||