No logging when using default Value when parsing
MODIFY
dd-java-agent/agent-profiling/profiling-controller/src/test/java/com/datadog/profiling/controller/ControllerFactoryTest.java
dd-java-agent/agent-profiling/profiling-controller/src/test/java/com/datadog/profiling/controller/ControllerFactoryTest.java
@@ -28,10 +28,21 @@ public class ControllerFactoryTest {
});
String expected =
"The JFR controller could not find a supported JFR API, use OpenJDK 11+ or Azul zulu version 1.8.0_212+";
- if ("Azul Systems, Inc.".equals(System.getProperty("java.vendor"))) {
+ final String javaVendor = System.getProperty("java.vendor");
+ final String javaRuntimeName = System.getProperty("java.runtime.name");
+ final String javaVersion = System.getProperty("java.version");
+ if ("Azul Systems, Inc.".equals(javaVendor)) {
expected =
"The JFR controller could not find a supported JFR API, use Azul zulu version 1.8.0_212+";
+ } else if ("Java(TM) SE Runtime Environment".equals(javaRuntimeName)
+ && "Oracle Corporation".equals(javaVendor)
+ && javaVersion.startsWith("1.8")) {
+ // condition for OracleJRE8 (with proprietary JFR inside)
+ expected = "The JFR controller is currently not supported on the Oracle JDK <= JDK 11!";
}
- assertEquals(expected, unsupportedEnvironmentException.getMessage());
+ assertEquals(
+ expected,
+ unsupportedEnvironmentException.getMessage(),
+ "'" + javaRuntimeName + "' / '" + javaVendor + "' / '" + javaVersion + "'");
}
}

MODIFY
dd-trace-api/src/main/java/datadog/trace/api/Config.java
dd-trace-api/src/main/java/datadog/trace/api/Config.java
@@ -1059,7 +1059,6 @@ public class Config {
private static <T> T valueOf(
final String value, @NonNull final Class<T> tClass, final T defaultValue) {
if (value == null || value.trim().isEmpty()) {
- log.debug("valueOf: using defaultValue '{}' for '{}' of '{}' ", defaultValue, value, tClass);
return defaultValue;
}
try {

No logging when using default Value when parsing (#1364)