googleJavaFormat

This commit is contained in:
dougqh 2019-09-23 15:29:15 -04:00
parent 6b5acc8386
commit 8a89547004
1 changed files with 14 additions and 17 deletions

View File

@ -1,15 +1,20 @@
package datadog.trace.instrumentation.springdata;
import static datadog.trace.instrumentation.springdata.SpringDataDecorator.DECORATOR;
import static net.bytebuddy.matcher.ElementMatchers.*;
import com.google.auto.service.AutoService;
import datadog.trace.agent.tooling.Instrumenter;
import io.opentracing.Scope;
import io.opentracing.Span;
import io.opentracing.util.GlobalTracer;
import java.lang.reflect.Method;
import java.util.Collections;
import java.util.Map;
import net.bytebuddy.asm.Advice;
import net.bytebuddy.description.method.MethodDescription;
import net.bytebuddy.description.type.TypeDescription;
import net.bytebuddy.matcher.ElementMatcher;
import net.bytebuddy.utility.JavaModule;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.springframework.aop.framework.ProxyFactory;
@ -17,14 +22,6 @@ import org.springframework.data.repository.Repository;
import org.springframework.data.repository.core.support.RepositoryFactorySupport;
import org.springframework.data.repository.core.support.RepositoryProxyPostProcessor;
import java.lang.reflect.Method;
import java.security.ProtectionDomain;
import java.util.Collections;
import java.util.Map;
import static datadog.trace.instrumentation.springdata.SpringDataDecorator.DECORATOR;
import static net.bytebuddy.matcher.ElementMatchers.*;
@AutoService(Instrumenter.class)
public final class SpringRepositoryInstrumentation extends Instrumenter.Default {
@ -50,8 +47,7 @@ public final class SpringRepositoryInstrumentation extends Instrumenter.Default
@Override
public Map<? extends ElementMatcher<? super MethodDescription>, String> transformers() {
return Collections.singletonMap(
isConstructor(),
RepositoryFactorySupportAdvice.class.getName());
isConstructor(), RepositoryFactorySupportAdvice.class.getName());
}
public static class RepositoryFactorySupportAdvice {
@ -63,7 +59,8 @@ public final class SpringRepositoryInstrumentation extends Instrumenter.Default
}
}
public static final class InterceptingRepositoryProxyPostProcessor implements RepositoryProxyPostProcessor {
public static final class InterceptingRepositoryProxyPostProcessor
implements RepositoryProxyPostProcessor {
public static final RepositoryProxyPostProcessor INSTANCE =
new InterceptingRepositoryProxyPostProcessor();