fix: formatting and add version to spark java instrumentation
MODIFY
dd-java-agent/instrumentation/jetty-9/src/main/java/datadog/trace/instrumentation/jetty9/HandlerInstrumentation.java
dd-java-agent/instrumentation/jetty-9/src/main/java/datadog/trace/instrumentation/jetty9/HandlerInstrumentation.java
package datadog.trace.instrumentation.jetty9;
+import static datadog.trace.agent.tooling.ClassLoaderMatcher.classLoaderHasClasses;
+import static io.opentracing.log.Fields.ERROR_OBJECT;
+import static net.bytebuddy.matcher.ElementMatchers.*;
+
import com.google.auto.service.AutoService;
import datadog.trace.agent.tooling.DDAdvice;
import datadog.trace.agent.tooling.HelperInjector;
@@ -14,20 +18,15 @@ import io.opentracing.contrib.web.servlet.filter.ServletFilterSpanDecorator;
import io.opentracing.propagation.Format;
import io.opentracing.tag.Tags;
import io.opentracing.util.GlobalTracer;
-import net.bytebuddy.agent.builder.AgentBuilder;
-import net.bytebuddy.asm.Advice;
-
+import java.io.IOException;
+import java.util.Collections;
+import java.util.concurrent.atomic.AtomicBoolean;
import javax.servlet.AsyncEvent;
import javax.servlet.AsyncListener;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import static datadog.trace.agent.tooling.ClassLoaderMatcher.classLoaderHasClasses;
-import static io.opentracing.log.Fields.ERROR_OBJECT;
-import static net.bytebuddy.matcher.ElementMatchers.*;
+import net.bytebuddy.agent.builder.AgentBuilder;
+import net.bytebuddy.asm.Advice;
@AutoService(Instrumenter.class)
public final class HandlerInstrumentation extends Instrumenter.Configurable {

RENAME
dd-java-agent/instrumentation/sparkjava/sparkjava.gradle
dd-java-agent/instrumentation/sparkjava-2.7/sparkjava.gradle
apply from: "${rootDir}/gradle/java.gradle"
-if (JavaVersion.current() != JavaVersion.VERSION_1_8) {
+if (JavaVersion.isJava8Compatible()) {
sourceSets {
test {
groovy {

RENAME
dd-java-agent/instrumentation/sparkjava/src/main/java/datadog/trace/instrumentation/sparkjava/RoutesInstrumentation.java
dd-java-agent/instrumentation/sparkjava-2.7/src/main/java/datadog/trace/instrumentation/sparkjava/RoutesInstrumentation.java
package datadog.trace.instrumentation.sparkjava;
+import static datadog.trace.agent.tooling.ClassLoaderMatcher.classLoaderHasClasses;
+import static net.bytebuddy.matcher.ElementMatchers.*;
+
import datadog.trace.agent.tooling.DDAdvice;
import datadog.trace.agent.tooling.Instrumenter;
import datadog.trace.api.DDTags;
@@ -10,9 +13,6 @@ import net.bytebuddy.asm.Advice;
import spark.route.HttpMethod;
import spark.routematch.RouteMatch;
-import static datadog.trace.agent.tooling.ClassLoaderMatcher.classLoaderHasClasses;
-import static net.bytebuddy.matcher.ElementMatchers.*;
-
public class RoutesInstrumentation extends Instrumenter.Configurable {
public RoutesInstrumentation() {

RENAME
dd-java-agent/instrumentation/sparkjava/src/test/groovy/SparkJavaBasedTest.groovy
dd-java-agent/instrumentation/sparkjava-2.7/src/test/groovy/SparkJavaBasedTest.groovy
RENAME
dd-java-agent/instrumentation/sparkjava/src/test/java/TestSparkJavaApplication.java
dd-java-agent/instrumentation/sparkjava-2.7/src/test/java/TestSparkJavaApplication.java
MODIFY
settings.gradle
settings.gradle
@@ -35,7 +35,7 @@ include ':dd-java-agent:instrumentation:play-2.4:play-2.6-testing'
include ':dd-java-agent:instrumentation:ratpack-1.4'
include ':dd-java-agent:instrumentation:servlet-2'
include ':dd-java-agent:instrumentation:servlet-3'
-include ':dd-java-agent:instrumentation:sparkjava'
+include ':dd-java-agent:instrumentation:sparkjava-2.7'
include ':dd-java-agent:instrumentation:spring-web'
include ':dd-java-agent:instrumentation:trace-annotation'

fix: formatting and add version to spark java instrumentation