Skip to content

Commit

Permalink
Merge pull request alibaba#286 from z529192557/master
Browse files Browse the repository at this point in the history
修改SandboxClassFileTransformer需要add的时机,修复Agent模式类增强失效
  • Loading branch information
dongchenxu authored Jul 6, 2020
2 parents 2fbbb86 + 996fe5a commit dbae17c
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ private void reTransformClasses(
final int watchId,
final List<Class<?>> waitingReTransformClasses,
final Progress progress) {

// 在真正做retransform 前的一刻,做addTransformer,避免java.lang.ClassCircularityError
if(null != transformer){
inst.addTransformer(transformer, true);
}
// 需要形变总数
final int total = waitingReTransformClasses.size();

Expand Down Expand Up @@ -118,10 +121,6 @@ private void reTransformClasses(
);
}
}
// 在真正做retransform 前的一刻,做addTransformer,避免java.lang.ClassCircularityError
if(null != transformer){
inst.addTransformer(transformer, true);
}
inst.retransformClasses(waitingReTransformClass);
logger.info("watch={} in module={} single reTransform {} success, at index={};total={};",
watchId, coreModule.getUniqueId(), waitingReTransformClass,
Expand Down

0 comments on commit dbae17c

Please sign in to comment.