Skip to content

Commit 6fa723b

Browse files
committed
remove maven-specific code
1 parent bd57cf1 commit 6fa723b

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

sdk-extensions/autoconfigure/src/main/java/io/opentelemetry/sdk/autoconfigure/AutoConfiguredOpenTelemetrySdkBuilder.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ public final class AutoConfiguredOpenTelemetrySdkBuilder implements AutoConfigur
6060
private static final Logger logger =
6161
Logger.getLogger(AutoConfiguredOpenTelemetrySdkBuilder.class.getName());
6262
private static final boolean INCUBATOR_AVAILABLE;
63-
private static final Boolean IS_MAVEN;
6463

6564
static {
6665
boolean incubatorAvailable = false;
@@ -74,7 +73,6 @@ public final class AutoConfiguredOpenTelemetrySdkBuilder implements AutoConfigur
7473
// Not available
7574
}
7675
INCUBATOR_AVAILABLE = incubatorAvailable;
77-
IS_MAVEN = System.getProperty("maven.home") != null;
7876
}
7977

8078
@Nullable private ConfigProperties config;
@@ -638,12 +636,9 @@ Thread shutdownHook(OpenTelemetrySdk sdk) {
638636
sdk.close();
639637
} catch (NoClassDefFoundError e) {
640638
// https://github.com/open-telemetry/opentelemetry-java/issues/6827
641-
if (IS_MAVEN) {
642-
// logging deps might not be on the classpath at this point
643-
System.out.printf("%s Flush failed during shutdown: %s%n", Level.WARNING, e);
644-
return;
645-
}
646-
throw e;
639+
// logging deps might not be on the classpath at this point
640+
System.out.printf("%s Flush failed during shutdown: %s%n", Level.WARNING, e);
641+
return;
647642
}
648643
});
649644
}

0 commit comments

Comments
 (0)