From e9e83c9aa1bef46efd7eeca7aff5b68e274d4c7f Mon Sep 17 00:00:00 2001 From: superheizai Date: Tue, 24 Nov 2020 17:18:32 +0800 Subject: [PATCH] use advise's classloader to avoid NPE when the class is not loaded by current thread (#1586) --- .../arthas/core/command/monitor200/TimeTunnelCommand.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/taobao/arthas/core/command/monitor200/TimeTunnelCommand.java b/core/src/main/java/com/taobao/arthas/core/command/monitor200/TimeTunnelCommand.java index ca19c15dc..9a6279eee 100644 --- a/core/src/main/java/com/taobao/arthas/core/command/monitor200/TimeTunnelCommand.java +++ b/core/src/main/java/com/taobao/arthas/core/command/monitor200/TimeTunnelCommand.java @@ -354,7 +354,8 @@ public class TimeTunnelCommand extends EnhancerCommand { } Advice advice = tf.getAdvice(); - Object value = ExpressFactory.threadLocalExpress(advice).get(watchExpress); + + Object value = ExpressFactory.unpooledExpress(advice.getLoader()).bind(advice).get(watchExpress); TimeTunnelModel timeTunnelModel = new TimeTunnelModel() .setWatchValue(value) .setExpand(expand)