Skip to content

Commit 4e6dda1

Browse files
Reenable full classloader instrumentation
1 parent d7e9e42 commit 4e6dda1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Diff for: newrelic-agent/src/main/java/com/newrelic/agent/instrumentation/builtin/AgentClassLoaderInstrumentation.java

+9-9
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ private boolean isNewRelicClass(String className) {
4444
* @param name the name of the class we are loading
4545
* @return the loaded Class
4646
*/
47-
// public Class<?> loadClass(String name) throws ClassNotFoundException {
48-
//// if (isNewRelicClass(name)) {
49-
//// Class<?> clazz = loadNewRelicClass(name);
50-
//// if (clazz != null) {
51-
//// return clazz;
52-
//// }
53-
//// }
54-
// return Weaver.callOriginal();
55-
// }
47+
public Class<?> loadClass(String name) {
48+
if (isNewRelicClass(name)) {
49+
Class<?> clazz = loadNewRelicClass(name);
50+
if (clazz != null) {
51+
return clazz;
52+
}
53+
}
54+
return Weaver.callOriginal();
55+
}
5656

5757
/**
5858
* Delegate class loading to the agent's ClassLoader if we aren't currently trying to hijack this ClassLoader.

0 commit comments

Comments
 (0)