Setting the length of the new array to optimize speed
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1088439 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a859fffc0a
commit
f5a6dc28f5
|
@ -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()]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -886,7 +886,7 @@ public class TypeUtils {
|
|||
}
|
||||
}
|
||||
|
||||
return types.toArray(new Type[0]);
|
||||
return types.toArray(new Type[types.size()]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue