Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,14 @@ tasks {
dependsOn(testSerial)
}

tasks {
compileJava {
// We compile this module for java 8 because it is used as a dependency in spring-boot-autoconfigure.
// If this module is compiled for java 17 then gradle can figure out based on the metadata that
// spring-boot-autoconfigure has a dependency that requires 17 and fails the build when it is used
// in a project that targets an earlier java version.
// https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/13384
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
options.release.set(null as Int?)
}
compileJava {
// We compile this module for java 8 because it is used as a dependency in spring-boot-autoconfigure.
// If this module is compiled for java 17 then gradle can figure out based on the metadata that
// spring-boot-autoconfigure has a dependency that requires 17 and fails the build when it is used
// in a project that targets an earlier java version.
// https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/13384
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
options.release.set(null as Int?)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public final class ThreadGrouper {
@Nullable
public String groupedName(RecordedEvent ev) {
Object thisField = ev.getValue("eventThread");
if (thisField instanceof RecordedThread thread) {
return thread.getJavaName();
if (thisField instanceof RecordedThread) {
return ((RecordedThread) thisField).getJavaName();
}
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ private static void doIfAvailable(
return;
}
Object value = event.getValue(field);
if (value instanceof RecordedObject recordedObject) {
closure.accept(recordedObject);
if (value instanceof RecordedObject) {
closure.accept((RecordedObject) value);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ private static void doIfAvailable(
return;
}
Object value = event.getValue(field);
if (value instanceof RecordedObject recordedObject) {
closure.accept(recordedObject);
if (value instanceof RecordedObject) {
closure.accept((RecordedObject) value);
}
}

Expand Down
Loading