Replace LinkedList with more efficient ArrayList
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@366620 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9116953ca1
commit
4e74f83aad
|
@ -24,7 +24,6 @@ import java.lang.reflect.Method;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
|
|
||||||
|
@ -884,7 +883,7 @@ public class ExceptionUtils {
|
||||||
static String[] getStackFrames(String stackTrace) {
|
static String[] getStackFrames(String stackTrace) {
|
||||||
String linebreak = SystemUtils.LINE_SEPARATOR;
|
String linebreak = SystemUtils.LINE_SEPARATOR;
|
||||||
StringTokenizer frames = new StringTokenizer(stackTrace, linebreak);
|
StringTokenizer frames = new StringTokenizer(stackTrace, linebreak);
|
||||||
List list = new LinkedList();
|
List list = new ArrayList();
|
||||||
while (frames.hasMoreTokens()) {
|
while (frames.hasMoreTokens()) {
|
||||||
list.add(frames.nextToken());
|
list.add(frames.nextToken());
|
||||||
}
|
}
|
||||||
|
@ -907,7 +906,7 @@ public class ExceptionUtils {
|
||||||
String stackTrace = getStackTrace(t);
|
String stackTrace = getStackTrace(t);
|
||||||
String linebreak = SystemUtils.LINE_SEPARATOR;
|
String linebreak = SystemUtils.LINE_SEPARATOR;
|
||||||
StringTokenizer frames = new StringTokenizer(stackTrace, linebreak);
|
StringTokenizer frames = new StringTokenizer(stackTrace, linebreak);
|
||||||
List list = new LinkedList();
|
List list = new ArrayList();
|
||||||
boolean traceStarted = false;
|
boolean traceStarted = false;
|
||||||
while (frames.hasMoreTokens()) {
|
while (frames.hasMoreTokens()) {
|
||||||
String token = frames.nextToken();
|
String token = frames.nextToken();
|
||||||
|
|
Loading…
Reference in New Issue