Skip to content

Commit 7aa0f04

Browse files
committed
修复watch命令获取对象属性并发情况导致获取Field异常(NoSuchFieldException)
1 parent b266e1c commit 7aa0f04

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/src/main/java/com/taobao/arthas/core/command/express/OgnlExpress.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ public OgnlExpress(ClassResolver classResolver) {
3333
@Override
3434
public Object get(String express) throws ExpressException {
3535
try {
36-
return Ognl.getValue(express, context, bindObject);
36+
synchronized (express.intern()) {
37+
return Ognl.getValue(express, context, bindObject);
38+
}
3739
} catch (Exception e) {
3840
logger.error("Error during evaluating the expression:", e);
3941
throw new ExpressException(express, e);

0 commit comments

Comments
 (0)