Skip to content

Commit 240da0d

Browse files
author
David R. MacIver
committed
use System.arraycopy rather than a manual copy
1 parent d2536ff commit 240da0d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/com/rabbitmq/utility/Utility.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ public static <T extends Throwable> T fixStackTrace(T throwable){
7575
// We want to remove fixStackTrace from the trace.
7676
StackTraceElement[] existing = throwable.getStackTrace();
7777
StackTraceElement[] newTrace = new StackTraceElement[existing.length - 1];
78-
for(int i = 0; i < newTrace.length; i++)
79-
newTrace[i] = existing[i + 1];
78+
System.arraycopy(existing, 1, newTrace, 0, newTrace.length);
8079
throwable.setStackTrace(newTrace);
8180
return throwable;
8281
}

0 commit comments

Comments
 (0)