Fix NPE in rmi server instrumentation (#5042)

This commit is contained in:
Lauri Tulmin 2022-01-07 21:47:23 +02:00 committed by GitHub
parent 478800e5de
commit d5bd3cb91b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -57,6 +57,9 @@ public class RemoteServerInstrumentation implements TypeInstrumentation {
// TODO review and unify with all other SERVER instrumentation
Context parentContext = THREAD_LOCAL_CONTEXT.getAndResetContext();
if (parentContext == null) {
return;
}
request = ClassAndMethod.create(declaringClass, methodName);
if (!instrumenter().shouldStart(parentContext, request)) {
return;