Remove one unnecessary list copy from AgentLocationStrategy
MODIFY
muzzle/src/main/java/io/opentelemetry/javaagent/tooling/muzzle/AgentLocationStrategy.java
muzzle/src/main/java/io/opentelemetry/javaagent/tooling/muzzle/AgentLocationStrategy.java
@@ -39,6 +39,6 @@ public class AgentLocationStrategy implements AgentBuilder.LocationStrategy {
classLoader = classLoader.getParent();
}
- return new ClassFileLocator.Compound(locators.toArray(new ClassFileLocator[0]));
+ return new ClassFileLocator.Compound(locators);
}
}

Remove one unnecessary list copy from AgentLocationStrategy (#4156)