Skip to content

Commit

Permalink
Update error message based on new findings (#4228)
Browse files Browse the repository at this point in the history
  • Loading branch information
trask committed Sep 29, 2021
1 parent ba332a9 commit 4392607
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,12 @@ static Map<String, ClassRef> getFor(InstrumentationModule instrumentationModule)
}

// 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();
}
}

0 comments on commit 4392607

Please sign in to comment.