Fix NPE in handleMethodException method of apm-jdk-threadpool-plugin. (#681)

Co-authored-by: forrestwang <forrest.wang@woo.network>
This commit is contained in:
ForrestWang123 2024-04-18 21:19:50 +08:00 committed by GitHub
parent 23287f90c8
commit ec30b5f53d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View File

@ -6,6 +6,7 @@ Release Notes.
------------------
* Remove `idleCount` tag in Alibaba Druid meter plugin.
* Fix NPE in handleMethodException method of apm-jdk-threadpool-plugin.
All issues and pull requests are [here](https://github.com/apache/skywalking/milestone/213?closed=1)

View File

@ -63,6 +63,10 @@ public abstract class AbstractThreadingPoolInterceptor implements InstanceMethod
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, Throwable t) {
if (!ContextManager.isActive()) {
return;
}
ContextManager.activeSpan().log(t);
}
}