Ignore classes in java.lang.invoke in early instrumentations (#13602)
This commit is contained in:
parent
7e5d4cc8b3
commit
5626e25bb1
|
@ -56,7 +56,6 @@ import java.util.Collections;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.logging.LogManager;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.stream.Stream;
|
||||
|
@ -227,8 +226,11 @@ public class AgentInstaller {
|
|||
AgentBuilder.Identified.Extendable extendableAgentBuilder =
|
||||
agentBuilder
|
||||
.ignore(
|
||||
target -> instrumentationInstalled, // turn off after instrumentation is installed
|
||||
Objects::nonNull)
|
||||
target ->
|
||||
// turn off after instrumentation is installed, exclude classes in
|
||||
// java.lang.invoke to avoid circularity when bootstrapping indy instrumentation
|
||||
instrumentationInstalled
|
||||
|| target.getTypeName().startsWith("java.lang.invoke."))
|
||||
.type(none())
|
||||
.transform(
|
||||
(builder, typeDescription, classLoader, module, protectionDomain) -> builder);
|
||||
|
|
Loading…
Reference in New Issue