diff --git a/javaagent-tooling/javaagent-tooling-java9/src/main/java/io/opentelemetry/javaagent/tooling/ModuleOpener.java b/javaagent-tooling/javaagent-tooling-java9/src/main/java/io/opentelemetry/javaagent/tooling/ModuleOpener.java index 81ce0e0a1398..3278ada40f0b 100644 --- a/javaagent-tooling/javaagent-tooling-java9/src/main/java/io/opentelemetry/javaagent/tooling/ModuleOpener.java +++ b/javaagent-tooling/javaagent-tooling-java9/src/main/java/io/opentelemetry/javaagent/tooling/ModuleOpener.java @@ -45,10 +45,8 @@ public static void open( missingOpens.put(packageName, openToModuleSet); logger.log( FINE, - () -> - String.format( - "Exposing package '%s' in module '%s' to module '%s'", - packageName, targetModule, openToModule)); + "Exposing package '{0}' in module '{1}' to module '{2}'", + new Object[] {packageName, targetModule, openToModule}); } } if (missingOpens.isEmpty()) { @@ -56,7 +54,7 @@ public static void open( } if (!instrumentation.isModifiableModule(targetModule)) { - logger.log(WARNING, "Module '{}' can't be modified", targetModule); + logger.log(WARNING, "Module '{0}' can't be modified", targetModule); return; }