Skip to content

Commit

Permalink
there's no need to clone backtrace array (JRuby 9K hasn't been doing so)
Browse files Browse the repository at this point in the history
  • Loading branch information
kares committed Nov 24, 2016
1 parent 321471d commit 1d03cbc
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion core/src/main/java/org/jruby/runtime/ThreadContext.java
Expand Up @@ -939,7 +939,6 @@ public void setEventHooksEnabled(boolean flag) {
* @return an Array with the backtrace
*/
public BacktraceElement[] createBacktrace2(int level, boolean nativeException) {
BacktraceElement[] backtrace = this.backtrace.clone(); // TODO do we need to clone?
BacktraceElement[] newTrace = new BacktraceElement[backtraceIndex + 1];
System.arraycopy(backtrace, 0, newTrace, 0, newTrace.length);
return newTrace;
Expand Down

0 comments on commit 1d03cbc

Please sign in to comment.