Skip to content

Commit 5f5d8a6

Browse files
committed
Fix deprecations
PullRequest: truffleruby/653
2 parents 01b517a + a2eb120 commit 5f5d8a6

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

src/main/java/org/truffleruby/core/thread/ThreadManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
1313
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
1414
import com.oracle.truffle.api.TruffleException;
15-
import com.oracle.truffle.api.TruffleStackTraceElement;
15+
import com.oracle.truffle.api.TruffleStackTrace;
1616
import com.oracle.truffle.api.interop.TruffleObject;
1717
import com.oracle.truffle.api.nodes.Node;
1818
import com.oracle.truffle.api.object.DynamicObject;
@@ -282,7 +282,7 @@ private static void setException(RubyContext context, DynamicObject thread, Dyna
282282
// to capture the backtrace from this thread.
283283
final TruffleException truffleException = Layouts.EXCEPTION.getBacktrace(exception).getRaiseException();
284284
if (truffleException != null) {
285-
TruffleStackTraceElement.fillIn((Throwable) truffleException);
285+
TruffleStackTrace.fillIn((Throwable) truffleException);
286286
}
287287

288288
final DynamicObject mainThread = context.getThreadManager().getRootThread();

src/main/java/org/truffleruby/language/backtrace/Backtrace.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
1313
import com.oracle.truffle.api.TruffleException;
14+
import com.oracle.truffle.api.TruffleStackTrace;
1415
import com.oracle.truffle.api.TruffleStackTraceElement;
1516
import com.oracle.truffle.api.nodes.Node;
1617
import com.oracle.truffle.api.nodes.RootNode;
@@ -49,7 +50,7 @@ public Backtrace copy(RubyContext context, DynamicObject exception) {
4950
// A Backtrace is 1-1-1 with a RaiseException and a Ruby exception
5051
RaiseException newRaiseException = new RaiseException(context, exception, this.raiseException.isInternalError());
5152
// Copy the TruffleStackTrace
52-
TruffleStackTraceElement.fillIn(this.raiseException);
53+
TruffleStackTrace.fillIn(this.raiseException);
5354
assert this.raiseException.getCause() != null;
5455
newRaiseException.initCause(this.raiseException.getCause());
5556
// Another way would be to copy the activations (copy.activations = getActivations()), but
@@ -88,7 +89,7 @@ public Activation[] getActivations(TruffleException truffleException) {
8889

8990
// The stacktrace is computed here if it was not already computed and stored in the
9091
// TruffleException with TruffleStackTraceElement.fillIn().
91-
final List<TruffleStackTraceElement> stackTrace = TruffleStackTraceElement.getStackTrace((Throwable) truffleException);
92+
final List<TruffleStackTraceElement> stackTrace = TruffleStackTrace.getStacktrace((Throwable) truffleException);
9293

9394
final List<Activation> activations = new ArrayList<>();
9495
final RubyContext context = RubyLanguage.getCurrentContext();

src/main/java/org/truffleruby/language/exceptions/TryNode.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
package org.truffleruby.language.exceptions;
1111

1212
import com.oracle.truffle.api.CompilerDirectives;
13-
import com.oracle.truffle.api.TruffleStackTraceElement;
13+
import com.oracle.truffle.api.TruffleStackTrace;
1414
import com.oracle.truffle.api.frame.VirtualFrame;
1515
import com.oracle.truffle.api.nodes.ControlFlowException;
1616
import com.oracle.truffle.api.nodes.ExplodeLoop;
@@ -88,7 +88,7 @@ private Object handleException(VirtualFrame frame, RaiseException exception) {
8888
* therefore the exception is no longer being thrown on the exception path and the
8989
* lazy stacktrace is no longer filled.
9090
*/
91-
TruffleStackTraceElement.fillIn(exception);
91+
TruffleStackTrace.fillIn(exception);
9292

9393
return setLastExceptionAndRunRescue(frame, exception, rescue);
9494
}

0 commit comments

Comments
 (0)