Remove a couple remaining dd prefixes
MODIFY
agent-bootstrap/src/test/groovy/io/opentelemetry/auto/bootstrap/AgentClassLoaderTest.groovy
agent-bootstrap/src/test/groovy/io/opentelemetry/auto/bootstrap/AgentClassLoaderTest.groovy
@@ -13,7 +13,7 @@ class AgentClassLoaderTest extends Specification {
def className1 = 'some/class/Name1'
def className2 = 'some/class/Name2'
final URL loc = getClass().getProtectionDomain().getCodeSource().getLocation()
- final AgentClassLoader ddLoader = new AgentClassLoader(loc, null, null)
+ final AgentClassLoader loader = new AgentClassLoader(loc, null, null)
final Phaser threadHoldLockPhase = new Phaser(2)
final Phaser acquireLockFromMainThreadPhase = new Phaser(2)
@@ -21,7 +21,7 @@ class AgentClassLoaderTest extends Specification {
final Thread thread1 = new Thread() {
@Override
void run() {
- synchronized (ddLoader.getClassLoadingLock(className1)) {
+ synchronized (loader.getClassLoadingLock(className1)) {
threadHoldLockPhase.arrive()
acquireLockFromMainThreadPhase.arriveAndAwaitAdvance()
}
@@ -33,7 +33,7 @@ class AgentClassLoaderTest extends Specification {
@Override
void run() {
threadHoldLockPhase.arriveAndAwaitAdvance()
- synchronized (ddLoader.getClassLoadingLock(className2)) {
+ synchronized (loader.getClassLoadingLock(className2)) {
acquireLockFromMainThreadPhase.arrive()
}
}

MODIFY
buildSrc/src/main/groovy/MuzzlePlugin.groovy
buildSrc/src/main/groovy/MuzzlePlugin.groovy
@@ -127,13 +127,13 @@ class MuzzlePlugin implements Plugin<Project> {
synchronized (TOOLING_LOADER) {
final ClassLoader toolingLoader = TOOLING_LOADER.get()
if (toolingLoader == null) {
- Set<URL> ddUrls = new HashSet<>()
+ Set<URL> urls = new HashSet<>()
toolingProject.getLogger().info('creating classpath for auto-tooling')
for (File f : toolingProject.sourceSets.main.runtimeClasspath.getFiles()) {
toolingProject.getLogger().info('--' + f)
- ddUrls.add(f.toURI().toURL())
+ urls.add(f.toURI().toURL())
}
- def loader = new URLClassLoader(ddUrls.toArray(new URL[0]), (ClassLoader) null)
+ def loader = new URLClassLoader(urls.toArray(new URL[0]), (ClassLoader) null)
assert TOOLING_LOADER.compareAndSet(null, loader)
return TOOLING_LOADER.get()
} else {
@@ -147,13 +147,13 @@ class MuzzlePlugin implements Plugin<Project> {
*/
private static ClassLoader createInstrumentationClassloader(Project project, Project toolingProject) {
project.getLogger().info("Creating instrumentation classpath for: " + project.getName())
- Set<URL> ddUrls = new HashSet<>()
+ Set<URL> urls = new HashSet<>()
for (File f : project.sourceSets.main.runtimeClasspath.getFiles()) {
project.getLogger().info('--' + f)
- ddUrls.add(f.toURI().toURL())
+ urls.add(f.toURI().toURL())
}
- return new URLClassLoader(ddUrls.toArray(new URL[0]), getOrCreateToolingLoader(toolingProject))
+ return new URLClassLoader(urls.toArray(new URL[0]), getOrCreateToolingLoader(toolingProject))
}
/**

MODIFY
java-agent/src/test/groovy/io/opentelemetry/auto/integration/classloading/ShadowPackageRenamingTest.groovy
java-agent/src/test/groovy/io/opentelemetry/auto/integration/classloading/ShadowPackageRenamingTest.groovy
@@ -8,20 +8,20 @@ import spock.lang.Specification
class ShadowPackageRenamingTest extends Specification {
def "agent dependencies renamed"() {
setup:
- final Class<?> ddClass =
+ final Class<?> clazz =
IntegrationTestUtils.getAgentClassLoader()
.loadClass("io.opentelemetry.auto.tooling.AgentInstaller")
final URL userGuava =
MapMaker.getProtectionDomain().getCodeSource().getLocation()
final URL agentGuavaDep =
- ddClass
+ clazz
.getClassLoader()
.loadClass("com.google.common.collect.MapMaker")
.getProtectionDomain()
.getCodeSource()
.getLocation()
final URL agentSource =
- ddClass.getProtectionDomain().getCodeSource().getLocation()
+ clazz.getProtectionDomain().getCodeSource().getLocation()
expect:
agentSource.getFile() == "/"

Remove a couple remaining dd prefixes (#170)