File tree 3 files changed +6
-5
lines changed
main/java/io/opentelemetry/javaagent/bootstrap
test/groovy/io/opentelemetry/javaagent/bootstrap
javaagent-tooling/javaagent-tooling-java9/src/test/groovy
3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -69,8 +69,9 @@ public class AgentClassLoader extends URLClassLoader {
69
69
private final boolean isSecurityManagerSupportEnabled ;
70
70
private final Manifest manifest ;
71
71
72
- public AgentClassLoader (File javaagentFile , String internalJarFileName ) {
73
- this (javaagentFile , internalJarFileName , false );
72
+ // Used by tests
73
+ public AgentClassLoader (File javaagentFile ) {
74
+ this (javaagentFile , "" , false );
74
75
}
75
76
76
77
/**
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ class AgentClassLoaderTest extends Specification {
19
19
def className2 = ' some/class/Name2'
20
20
// any jar would do, use opentelemety sdk
21
21
URL testJarLocation = JavaVersionSpecific . getProtectionDomain(). getCodeSource(). getLocation()
22
- AgentClassLoader loader = new AgentClassLoader (new File (testJarLocation. toURI()), " " )
22
+ AgentClassLoader loader = new AgentClassLoader (new File (testJarLocation. toURI()))
23
23
Phaser threadHoldLockPhase = new Phaser (2 )
24
24
Phaser acquireLockFromMainThreadPhase = new Phaser (2 )
25
25
@@ -58,7 +58,7 @@ class AgentClassLoaderTest extends Specification {
58
58
boolean jdk8 = " 1.8" == System . getProperty(" java.specification.version" )
59
59
// sdk is a multi release jar
60
60
URL multiReleaseJar = JavaVersionSpecific . getProtectionDomain(). getCodeSource(). getLocation()
61
- AgentClassLoader loader = new AgentClassLoader (new File (multiReleaseJar. toURI()), " " ) {
61
+ AgentClassLoader loader = new AgentClassLoader (new File (multiReleaseJar. toURI())) {
62
62
@Override
63
63
protected String getClassSuffix () {
64
64
return " "
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ class UnsafeTest extends Specification {
14
14
setup :
15
15
ByteBuddyAgent . install()
16
16
URL testJarLocation = AgentClassLoader . getProtectionDomain(). getCodeSource(). getLocation()
17
- AgentClassLoader loader = new AgentClassLoader (new File (testJarLocation. toURI()), " " )
17
+ AgentClassLoader loader = new AgentClassLoader (new File (testJarLocation. toURI()))
18
18
UnsafeInitializer . initialize(ByteBuddyAgent . getInstrumentation(), loader, false )
19
19
20
20
expect :
You can’t perform that action at this time.
0 commit comments