Fix some formatting changes.
MODIFY
dd-java-agent/agent-tooling/src/main/java/datadog/trace/agent/tooling/ExceptionHandlers.java
dd-java-agent/agent-tooling/src/main/java/datadog/trace/agent/tooling/ExceptionHandlers.java
@@ -32,8 +32,8 @@ public class ExceptionHandlers {
public Size apply(final MethodVisitor mv, final Implementation.Context context) {
// writes the following bytecode:
// try {
- // org.slf4j.LoggerFactory.getLogger((Class)ExceptionLogger.class).debug("exception
- // in instrumentation", t);
+ // org.slf4j.LoggerFactory.getLogger((Class)ExceptionLogger.class)
+ // .debug("exception in instrumentation", t);
// } catch (Throwable t2) {
// }
final Label logStart = new Label();
@@ -64,13 +64,13 @@ public class ExceptionHandlers {
mv.visitLabel(logEnd);
mv.visitJumpInsn(Opcodes.GOTO, handlerExit);
- // if the runtime can't reach our ExceptionHandler or logger, silently eat the
- // exception
+ // if the runtime can't reach our ExceptionHandler or logger,
+ // silently eat the exception
mv.visitLabel(eatException);
mv.visitFrame(Opcodes.F_SAME1, 0, null, 1, new Object[] {"java/lang/Throwable"});
mv.visitInsn(Opcodes.POP);
- // mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/Throwable", "printStackTrace",
- // "()V", false);
+ // mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/Throwable",
+ // "printStackTrace", "()V", false);
mv.visitLabel(handlerExit);
mv.visitFrame(Opcodes.F_SAME, 0, null, 0, null);

MODIFY
dd-java-agent/agent-tooling/src/main/java/datadog/trace/agent/tooling/Instrumenter.java
dd-java-agent/agent-tooling/src/main/java/datadog/trace/agent/tooling/Instrumenter.java
@@ -85,17 +85,18 @@ public interface Instrumenter {
new AgentBuilder.RawMatcher() {
@Override
public boolean matches(
- TypeDescription typeDescription,
- ClassLoader classLoader,
- JavaModule module,
- Class<?> classBeingRedefined,
- ProtectionDomain protectionDomain) {
- // Optimization: calling getInstrumentationMuzzle() inside this method
- // prevents unnecessary loading of muzzle references during agentBuilder
- // setup.
+ final TypeDescription typeDescription,
+ final ClassLoader classLoader,
+ final JavaModule module,
+ final Class<?> classBeingRedefined,
+ final ProtectionDomain protectionDomain) {
+ /* Optimization: calling getInstrumentationMuzzle() inside this method
+ * prevents unnecessary loading of muzzle references during agentBuilder
+ * setup.
+ */
final ReferenceMatcher muzzle = getInstrumentationMuzzle();
if (null != muzzle) {
- List<Reference.Mismatch> mismatches =
+ final List<Reference.Mismatch> mismatches =
muzzle.getMismatchedReferenceSources(classLoader);
if (mismatches.size() > 0) {
log.debug(
@@ -104,7 +105,7 @@ public interface Instrumenter {
this.getClass().getName(),
classLoader);
}
- for (Reference.Mismatch mismatch : mismatches) {
+ for (final Reference.Mismatch mismatch : mismatches) {
log.debug("-- {}", mismatch);
}
return mismatches.size() == 0;
@@ -117,7 +118,7 @@ public interface Instrumenter {
if (helperClassNames.length > 0) {
advice = advice.transform(new HelperInjector(helperClassNames));
}
- for (Map.Entry<ElementMatcher, String> entry : transformers().entrySet()) {
+ for (final Map.Entry<ElementMatcher, String> entry : transformers().entrySet()) {
advice = advice.transform(DDAdvice.create().advice(entry.getKey(), entry.getValue()));
}
return advice.asDecorator();

MODIFY
dd-java-agent/instrumentation/lettuce-5/src/main/java8/datadog/trace/instrumentation/lettuce/rx/LettuceMonoCreationAdvice.java
dd-java-agent/instrumentation/lettuce-5/src/main/java8/datadog/trace/instrumentation/lettuce/rx/LettuceMonoCreationAdvice.java
@@ -15,8 +15,7 @@ public class LettuceMonoCreationAdvice {
}
// throwables wouldn't matter here, because no spans have been started due to redis command not
- // being
- // run until the user subscribes to the Mono publisher
+ // being run until the user subscribes to the Mono publisher
@Advice.OnMethodExit(suppress = Throwable.class)
public static void monitorSpan(
@Advice.Enter final String commandName, @Advice.Return(readOnly = false) Mono<?> publisher) {

Fix some formatting changes.