Update error message based on new findings (#4228)

This commit is contained in:
Trask Stalnaker 2021-09-29 10:01:06 -07:00 committed by GitHub
parent ba332a970a
commit 43926071c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 8 deletions

View File

@ -55,18 +55,12 @@ class MuzzleReferencesAccessor {
}
// Older classes created and compiled outside of this repo may not yet have the interface above.
Map<String, ClassRef> muzzleReferences = emptyMap();
MethodHandle methodHandle = getMuzzleReferences.get(instrumentationModule.getClass());
if (methodHandle != null) {
logger.warn(
"{} is compiled with old version of Muzzle. Its support will stop soon. Please recompile it against newer version of OpenTelemetry Java Instrumentation APIs",
"{} is compiled with old version of Muzzle and must be recompiled against newer version of OpenTelemetry Java Instrumentation APIs",
instrumentationModule);
try {
muzzleReferences = (Map<String, ClassRef>) methodHandle.invoke(instrumentationModule);
} catch (Throwable ignored) {
// silence error prone
}
}
return muzzleReferences;
return emptyMap();
}
}