Skip to content

Commit

Permalink
修复watch命令获取对象属性并发情况导致获取Field异常(NoSuchFieldException)
Browse files Browse the repository at this point in the history
  • Loading branch information
zllVincent committed Dec 31, 2024
1 parent b266e1c commit 7aa0f04
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ public OgnlExpress(ClassResolver classResolver) {
@Override
public Object get(String express) throws ExpressException {
try {
return Ognl.getValue(express, context, bindObject);
synchronized (express.intern()) {
return Ognl.getValue(express, context, bindObject);
}
} catch (Exception e) {
logger.error("Error during evaluating the expression:", e);
throw new ExpressException(express, e);
Expand Down

0 comments on commit 7aa0f04

Please sign in to comment.