commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r1088439 - in /commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3: exception/ExceptionUtils.java reflect/TypeUtils.java
Date Sun, 03 Apr 2011 23:35:59 GMT
Author: bayard
Date: Sun Apr  3 23:35:59 2011
New Revision: 1088439

URL: http://svn.apache.org/viewvc?rev=1088439&view=rev
Log:
Setting the length of the new array to optimize speed

Modified:
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java?rev=1088439&r1=1088438&r2=1088439&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java
(original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java
Sun Apr  3 23:35:59 2011
@@ -551,7 +551,7 @@ public class ExceptionUtils {
                 frames.add(trace.get(j));
             }
         }
-        return frames.toArray(new String[0]);
+        return frames.toArray(new String[frames.size()]);
     }
 
     /**

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java?rev=1088439&r1=1088438&r2=1088439&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java
(original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java
Sun Apr  3 23:35:59 2011
@@ -886,7 +886,7 @@ public class TypeUtils {
             }
         }
 
-        return types.toArray(new Type[0]);
+        return types.toArray(new Type[types.size()]);
     }
 
     /**



Mime
View raw message