All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.opentelemetry.javaagent.tooling.instrumentation.indy.LookupExposer Maven / Gradle / Ivy

There is a newer version: 2.10.0-alpha
Show newest version
/*
 * Copyright The OpenTelemetry Authors
 * SPDX-License-Identifier: Apache-2.0
 */

package io.opentelemetry.javaagent.tooling.instrumentation.indy;

import java.lang.invoke.MethodHandles;

/**
 * This class is injected into every {@link InstrumentationModuleClassLoader} so that the bootstrap
 * can use a {@link MethodHandles.Lookup} with a lookup class from within the {@link
 * InstrumentationModuleClassLoader}, instead of calling {@link MethodHandles#lookup()} which uses
 * the caller class as the lookup class.
 *
 * 

This circumvents a nasty JVM bug that's described here. The error is reproduced in * {@code InstrumentationModuleClassLoaderTest} */ public class LookupExposer { private LookupExposer() {} public static MethodHandles.Lookup getLookup() { return MethodHandles.lookup(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy