Skip to content

Commit 6bdc537

Browse files
committed
Load class using ClassLoader
1 parent 306201e commit 6bdc537

File tree

1 file changed

+1
-1
lines changed
  • dd-java-agent/agent-profiling/profiling-controller-openjdk/src/main/java/com/datadog/profiling/controller/openjdk/events

1 file changed

+1
-1
lines changed

dd-java-agent/agent-profiling/profiling-controller-openjdk/src/main/java/com/datadog/profiling/controller/openjdk/events/SmapEntryFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class SmapEntryFactory {
3030
// Load JFR Handlers class early, if present (it has been moved and renamed in JDK23+).
3131
// This prevents a deadlock. See PROF-13025.
3232
try {
33-
Class.forName("jdk.jfr.events.Handlers");
33+
SmapEntryFactory.class.getClassLoader().loadClass("jdk.jfr.events.Handlers");
3434
} catch (Exception e) {
3535
// Ignore when the class is not found or anything else goes wrong.
3636
}

0 commit comments

Comments
 (0)