Browse Source

REPORT-17684 third的byteBuddy包名修改不完整,可能是导致test失败的原因

research/11.0
Harrison 6 years ago
parent
commit
164b77fc8f
  1. 12
      fine-byte-buddy/src/com/fr/third/net/bytebuddy/agent/builder/AgentBuilder.java
  2. 2
      fine-byte-buddy/src/com/fr/third/net/bytebuddy/dynamic/ClassFileLocator.java
  3. 2
      fine-byte-buddy/src/com/fr/third/net/bytebuddy/dynamic/loading/ClassReloadingStrategy.java

12
fine-byte-buddy/src/com/fr/third/net/bytebuddy/agent/builder/AgentBuilder.java

@ -7749,7 +7749,7 @@ public interface AgentBuilder {
* MethodType instantiatedMethodType) throws Exception { * MethodType instantiatedMethodType) throws Exception {
* Unsafe unsafe = Unsafe.getUnsafe(); * Unsafe unsafe = Unsafe.getUnsafe();
* {@code Class<?>} lambdaClass = unsafe.defineAnonymousClass(caller.lookupClass(), * {@code Class<?>} lambdaClass = unsafe.defineAnonymousClass(caller.lookupClass(),
* (byte[]) ClassLoader.getSystemClassLoader().loadClass("net.bytebuddy.agent.builder.LambdaFactory").getDeclaredMethod("make", * (byte[]) ClassLoader.getSystemClassLoader().loadClass("com.fr.third.net.bytebuddy.agent.builder.LambdaFactory").getDeclaredMethod("make",
* Object.class, * Object.class,
* String.class, * String.class,
* Object.class, * Object.class,
@ -7799,7 +7799,7 @@ public interface AgentBuilder {
methodVisitor.visitVarInsn(Opcodes.ALOAD, 0); methodVisitor.visitVarInsn(Opcodes.ALOAD, 0);
methodVisitor.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/invoke/MethodHandles$Lookup", "lookupClass", "()Ljava/lang/Class;", false); methodVisitor.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/invoke/MethodHandles$Lookup", "lookupClass", "()Ljava/lang/Class;", false);
methodVisitor.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/ClassLoader", "getSystemClassLoader", "()Ljava/lang/ClassLoader;", false); methodVisitor.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/ClassLoader", "getSystemClassLoader", "()Ljava/lang/ClassLoader;", false);
methodVisitor.visitLdcInsn("net.bytebuddy.agent.builder.LambdaFactory"); methodVisitor.visitLdcInsn("com.fr.third.net.bytebuddy.agent.builder.LambdaFactory");
methodVisitor.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/ClassLoader", "loadClass", "(Ljava/lang/String;)Ljava/lang/Class;", false); methodVisitor.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/ClassLoader", "loadClass", "(Ljava/lang/String;)Ljava/lang/Class;", false);
methodVisitor.visitLdcInsn("make"); methodVisitor.visitLdcInsn("make");
methodVisitor.visitIntInsn(Opcodes.BIPUSH, 9); methodVisitor.visitIntInsn(Opcodes.BIPUSH, 9);
@ -7956,7 +7956,7 @@ public interface AgentBuilder {
* } * }
* Unsafe unsafe = Unsafe.getUnsafe(); * Unsafe unsafe = Unsafe.getUnsafe();
* {@code Class<?>} lambdaClass = unsafe.defineAnonymousClass(caller.lookupClass(), * {@code Class<?>} lambdaClass = unsafe.defineAnonymousClass(caller.lookupClass(),
* (byte[]) ClassLoader.getSystemClassLoader().loadClass("net.bytebuddy.agent.builder.LambdaFactory").getDeclaredMethod("make", * (byte[]) ClassLoader.getSystemClassLoader().loadClass("com.fr.third.net.bytebuddy.agent.builder.LambdaFactory").getDeclaredMethod("make",
* Object.class, * Object.class,
* String.class, * String.class,
* Object.class, * Object.class,
@ -8079,7 +8079,7 @@ public interface AgentBuilder {
methodVisitor.visitVarInsn(Opcodes.ALOAD, 0); methodVisitor.visitVarInsn(Opcodes.ALOAD, 0);
methodVisitor.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/invoke/MethodHandles$Lookup", "lookupClass", "()Ljava/lang/Class;", false); methodVisitor.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/invoke/MethodHandles$Lookup", "lookupClass", "()Ljava/lang/Class;", false);
methodVisitor.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/ClassLoader", "getSystemClassLoader", "()Ljava/lang/ClassLoader;", false); methodVisitor.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/ClassLoader", "getSystemClassLoader", "()Ljava/lang/ClassLoader;", false);
methodVisitor.visitLdcInsn("net.bytebuddy.agent.builder.LambdaFactory"); methodVisitor.visitLdcInsn("com.fr.third.net.bytebuddy.agent.builder.LambdaFactory");
methodVisitor.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/ClassLoader", "loadClass", "(Ljava/lang/String;)Ljava/lang/Class;", false); methodVisitor.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/ClassLoader", "loadClass", "(Ljava/lang/String;)Ljava/lang/Class;", false);
methodVisitor.visitLdcInsn("make"); methodVisitor.visitLdcInsn("make");
methodVisitor.visitIntInsn(Opcodes.BIPUSH, 9); methodVisitor.visitIntInsn(Opcodes.BIPUSH, 9);
@ -8244,7 +8244,7 @@ public interface AgentBuilder {
/** /**
* The name of the Byte Buddy {@code net.bytebuddy.agent.Installer} class. * The name of the Byte Buddy {@code net.bytebuddy.agent.Installer} class.
*/ */
private static final String INSTALLER_TYPE = "net.bytebuddy.agent.Installer"; private static final String INSTALLER_TYPE = "com.fr.third.net.bytebuddy.agent.Installer";
/** /**
* The name of the {@code net.bytebuddy.agent.Installer} getter for reading an installed {@link Instrumentation}. * The name of the {@code net.bytebuddy.agent.Installer} getter for reading an installed {@link Instrumentation}.
@ -8421,7 +8421,7 @@ public interface AgentBuilder {
InstallationListener.NoOp.INSTANCE, InstallationListener.NoOp.INSTANCE,
new RawMatcher.Disjunction( new RawMatcher.Disjunction(
new RawMatcher.ForElementMatchers(ElementMatchers.any(), ElementMatchers.isBootstrapClassLoader().or(ElementMatchers.isExtensionClassLoader())), new RawMatcher.ForElementMatchers(ElementMatchers.any(), ElementMatchers.isBootstrapClassLoader().or(ElementMatchers.isExtensionClassLoader())),
new RawMatcher.ForElementMatchers(ElementMatchers.nameStartsWith("net.bytebuddy.").or(ElementMatchers.nameStartsWith("sun.reflect.")).<TypeDescription>or(ElementMatchers.isSynthetic()))), new RawMatcher.ForElementMatchers(ElementMatchers.nameStartsWith("com.fr.third.net.bytebuddy.").or(ElementMatchers.nameStartsWith("sun.reflect.")).<TypeDescription>or(ElementMatchers.isSynthetic()))),
Transformation.Ignored.INSTANCE); Transformation.Ignored.INSTANCE);
} }

2
fine-byte-buddy/src/com/fr/third/net/bytebuddy/dynamic/ClassFileLocator.java

@ -1166,7 +1166,7 @@ public interface ClassFileLocator extends Closeable {
/** /**
* The name of the Byte Buddy {@code net.bytebuddy.agent.Installer} class. * The name of the Byte Buddy {@code net.bytebuddy.agent.Installer} class.
*/ */
private static final String INSTALLER_TYPE = "net.bytebuddy.agent.Installer"; private static final String INSTALLER_TYPE = "com.fr.third.net.bytebuddy.agent.Installer";
/** /**
* The name of the {@code net.bytebuddy.agent.Installer} getter for reading an installed {@link Instrumentation}. * The name of the {@code net.bytebuddy.agent.Installer} getter for reading an installed {@link Instrumentation}.

2
fine-byte-buddy/src/com/fr/third/net/bytebuddy/dynamic/loading/ClassReloadingStrategy.java

@ -55,7 +55,7 @@ public class ClassReloadingStrategy implements ClassLoadingStrategy<ClassLoader>
/** /**
* The name of the Byte Buddy {@code net.bytebuddy.agent.Installer} class. * The name of the Byte Buddy {@code net.bytebuddy.agent.Installer} class.
*/ */
private static final String INSTALLER_TYPE = "net.bytebuddy.agent.Installer"; private static final String INSTALLER_TYPE = "com.fr.third.net.bytebuddy.agent.Installer";
/** /**
* The name of the {@code net.bytebuddy.agent.Installer} getter for reading an installed {@link Instrumentation}. * The name of the {@code net.bytebuddy.agent.Installer} getter for reading an installed {@link Instrumentation}.

Loading…
Cancel
Save