You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: rollbar-java-agent/src/test/java/com/rollbar/agent/instrumentation/ApacheHttpClient4InstrumentationTest.java
+31Lines changed: 31 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@
17
17
importorg.junit.jupiter.api.BeforeEach;
18
18
importorg.junit.jupiter.api.Test;
19
19
20
+
importjava.lang.reflect.Method;
20
21
importjava.util.List;
21
22
importjava.util.Map;
22
23
@@ -142,4 +143,34 @@ public void urlSanitization_stripsQuery() throws Exception {
142
143
assertTrue(url.contains("/path"));
143
144
assertFalse(url.contains("secret"));
144
145
}
146
+
147
+
/**
148
+
* ByteBuddy resolves an advice method's parameter and return types in the classloader that loaded
149
+
* the advice class — the agent's. Naming an {@code org.apache.http} type here throws
150
+
* NoClassDefFoundError at weave time wherever HC 4.x lives in a classloader the agent cannot see
Copy file name to clipboardExpand all lines: rollbar-java-agent/src/test/java/com/rollbar/agent/instrumentation/ApacheHttpClient5InstrumentationTest.java
+31Lines changed: 31 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@
16
16
importorg.junit.jupiter.api.BeforeEach;
17
17
importorg.junit.jupiter.api.Test;
18
18
19
+
importjava.lang.reflect.Method;
19
20
importjava.util.List;
20
21
importjava.util.Map;
21
22
@@ -162,4 +163,34 @@ public void urlSanitization_stripsQuery() throws Exception {
162
163
assertTrue(url.contains("/path"), "URL should include path: " + url);
163
164
assertFalse(url.contains("secret"), "URL should not contain query params: " + url);
164
165
}
166
+
167
+
/**
168
+
* ByteBuddy resolves an advice method's parameter and return types in the classloader that loaded
169
+
* the advice class — the agent's. Naming an {@code org.apache.hc} type here throws
170
+
* NoClassDefFoundError at weave time wherever HC 5.x lives in a classloader the agent cannot see
0 commit comments