ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r354101 - in /ant/core/trunk: proposal/xdocs/src/org/apache/ant/xdoclet/TaskTagsHandler.java src/main/org/apache/tools/ant/types/CommandlineJava.java
Date Mon, 05 Dec 2005 17:13:13 GMT
Author: jkf
Date: Mon Dec  5 09:13:07 2005
New Revision: 354101

URL: http://svn.apache.org/viewcvs?rev=354101&view=rev
Log:
PR 37777  Performance improvements by Dave Brosius

Modified:
    ant/core/trunk/proposal/xdocs/src/org/apache/ant/xdoclet/TaskTagsHandler.java
    ant/core/trunk/src/main/org/apache/tools/ant/types/CommandlineJava.java

Modified: ant/core/trunk/proposal/xdocs/src/org/apache/ant/xdoclet/TaskTagsHandler.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/proposal/xdocs/src/org/apache/ant/xdoclet/TaskTagsHandler.java?rev=354101&r1=354100&r2=354101&view=diff
==============================================================================
--- ant/core/trunk/proposal/xdocs/src/org/apache/ant/xdoclet/TaskTagsHandler.java (original)
+++ ant/core/trunk/proposal/xdocs/src/org/apache/ant/xdoclet/TaskTagsHandler.java Mon Dec
 5 09:13:07 2005
@@ -599,7 +599,7 @@
             attributeMethods.add(method);
         }
 
-        return (XMethod[]) attributeMethods.toArray(new XMethod[0]);
+        return (XMethod[]) attributeMethods.toArray(new XMethod[attributeMethods.size()]);
     }
 
     /**
@@ -708,7 +708,7 @@
             elementMethods.add(method);
         }
 
-        return (XMethod[]) elementMethods.toArray(new XMethod[0]);
+        return (XMethod[]) elementMethods.toArray(new XMethod[elementMethods.size()]);
     }
 
     /**
@@ -849,7 +849,7 @@
                 }
             });
 
-        return (XMethod[]) methods.toArray(new XMethod[0]);
+        return (XMethod[]) methods.toArray(new XMethod[methods.size()]);
     }
 }
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/CommandlineJava.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/types/CommandlineJava.java?rev=354101&r1=354100&r2=354101&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/CommandlineJava.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/CommandlineJava.java Mon Dec  5 09:13:07
2005
@@ -91,7 +91,7 @@
             if (definitions.size() == 0) {
                 return null;
             } else {
-                return (String[]) definitions.toArray(new String[0]);
+                return (String[]) definitions.toArray(new String[definitions.size()]);
             }
         }
 
@@ -397,7 +397,7 @@
         //fill it
         addCommandsToList(listIterator);
         //convert to an array
-        return (String[]) commands.toArray(new String[0]);
+        return (String[]) commands.toArray(new String[commands.size()]);
     }
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message