Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release_1.3.4 to support jdk18 #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

<groupId>com.alibaba.jvm.sandbox</groupId>
<artifactId>sandbox</artifactId>
<version>1.3.3</version>
<version>1.3.4</version>
<packaging>pom</packaging>

<name>sandbox ${sandbox.version}</name>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sandbox.version>1.3.3</sandbox.version>
<sandbox.version>1.3.4</sandbox.version>
</properties>

<profiles>
Expand Down
2 changes: 1 addition & 1 deletion sandbox-agent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.alibaba.jvm.sandbox</groupId>
<artifactId>sandbox</artifactId>
<version>1.3.3</version>
<version>1.3.4</version>
</parent>
<artifactId>sandbox-agent</artifactId>
<name>sandbox-agent ${sandbox.version}</name>
Expand Down
2 changes: 1 addition & 1 deletion sandbox-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.alibaba.jvm.sandbox</groupId>
<artifactId>sandbox</artifactId>
<version>1.3.3</version>
<version>1.3.4</version>
</parent>
<artifactId>sandbox-api</artifactId>
<name>sandbox-api ${sandbox.version}</name>
Expand Down
2 changes: 1 addition & 1 deletion sandbox-common-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>sandbox</artifactId>
<groupId>com.alibaba.jvm.sandbox</groupId>
<version>1.3.3</version>
<version>1.3.4</version>
</parent>
<artifactId>sandbox-common-api</artifactId>
<name>sandbox-common-api ${sandbox.version}</name>
Expand Down
8 changes: 4 additions & 4 deletions sandbox-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.alibaba.jvm.sandbox</groupId>
<artifactId>sandbox</artifactId>
<version>1.3.3</version>
<version>1.3.4</version>
</parent>
<artifactId>sandbox-core</artifactId>
<name>sandbox-core ${sandbox.version}</name>
Expand Down Expand Up @@ -150,17 +150,17 @@
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>7.2</version>
<version>9.2</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-commons</artifactId>
<version>7.2</version>
<version>9.2</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-util</artifactId>
<version>7.2</version>
<version>9.2</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import static org.objectweb.asm.ClassReader.EXPAND_FRAMES;
import static org.objectweb.asm.ClassWriter.COMPUTE_FRAMES;
import static org.objectweb.asm.ClassWriter.COMPUTE_MAXS;
import static org.objectweb.asm.Opcodes.ASM7;
import static org.objectweb.asm.Opcodes.ASM9;

/**
* 事件代码增强器
Expand Down Expand Up @@ -99,7 +99,7 @@ public byte[] toByteCodeArray(final ClassLoader targetClassLoader,
final int targetClassLoaderObjectID = ObjectIDs.instance.identity(targetClassLoader);
cr.accept(
new EventWeaver(
ASM7, cw, namespace, listenerId,
ASM9, cw, namespace, listenerId,
targetClassLoaderObjectID,
cr.getClassName(),
signCodes,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class ReWriteMethod extends AdviceAdapter implements Opcodes, AsmTypes, A
* Creates a new {@link AdviceAdapter}.
*
* @param api the ASM API version implemented by this visitor. Must be one
* of {@link Opcodes#ASM4} or {@link Opcodes#ASM7}.
* of {@link Opcodes#ASM4} or {@link Opcodes#ASM9}.
* @param mv the method visitor to which this adapter delegates calls.
* @param access the method's access flags (see {@link Opcodes}).
* @param name the method's name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,14 +256,14 @@ public class ClassStructureImplByAsm extends FamilyClassStructure {
private Access fixAccess() {
final AtomicInteger accessRef = new AtomicInteger(this.classReader.getAccess());
final String internalClassName = this.classReader.getClassName();
this.classReader.accept(new ClassVisitor(ASM7) {
this.classReader.accept(new ClassVisitor(ASM9) {
@Override
public void visitInnerClass(String name, String outerName, String innerName, int access) {
if (StringUtils.equals(name, internalClassName)) {
accessRef.set(access);
}
}
}, ASM7);
}, ASM9);
return new AccessImplByAsm(accessRef.get());
}

Expand Down Expand Up @@ -402,7 +402,7 @@ public List<ClassStructure> getInterfaceClassStructures() {
@Override
protected List<ClassStructure> initialValue() {
final List<ClassStructure> annotationTypeClassStructures = new ArrayList<ClassStructure>();
accept(new ClassVisitor(ASM7) {
accept(new ClassVisitor(ASM9) {

@Override
public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
Expand Down Expand Up @@ -431,8 +431,7 @@ public List<ClassStructure> getAnnotationTypeClassStructures() {
@Override
protected List<BehaviorStructure> initialValue() {
final List<BehaviorStructure> behaviorStructures = new ArrayList<BehaviorStructure>();
accept(new ClassVisitor(ASM7) {

accept(new ClassVisitor(ASM9) {
@Override
public MethodVisitor visitMethod(final int access,
final String name,
Expand All @@ -446,7 +445,7 @@ public MethodVisitor visitMethod(final int access,
return super.visitMethod(access, name, desc, signature, exceptions);
}

return new MethodVisitor(ASM7, super.visitMethod(access, name, desc, signature, exceptions)) {
return new MethodVisitor(ASM9, super.visitMethod(access, name, desc, signature, exceptions)) {

private final Type methodType = Type.getMethodType(desc);
private final List<ClassStructure> annotationTypeClassStructures = new ArrayList<ClassStructure>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import static org.objectweb.asm.ClassReader.EXPAND_FRAMES;
import static org.objectweb.asm.ClassWriter.COMPUTE_FRAMES;
import static org.objectweb.asm.ClassWriter.COMPUTE_MAXS;
import static org.objectweb.asm.Opcodes.ASM7;
import static org.objectweb.asm.Opcodes.ASM9;

/**
* 测试第三方增强冲突情况
Expand All @@ -42,7 +42,7 @@ public byte[] transform(ClassLoader loader, byte[] classfileBuffer){
// 返回增强后字节码
final ClassReader cr = new ClassReader(classfileBuffer);
final ClassWriter cw = createClassWriter(loader, cr);
cr.accept(new ThirdClassVisitor(ASM7,cw,signCodes,cr.getClassName()),
cr.accept(new ThirdClassVisitor(ASM9,cw,signCodes,cr.getClassName()),
EXPAND_FRAMES
);
return dumpClassIfNecessary(cr.getClassName(), cw.toByteArray());
Expand Down
2 changes: 1 addition & 1 deletion sandbox-debug-module/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.alibaba.jvm.sandbox</groupId>
<artifactId>sandbox-module-starter</artifactId>
<version>1.3.3</version>
<version>1.3.4</version>
<relativePath>../sandbox-module-starter/pom.xml</relativePath>
</parent>
<artifactId>sandbox-debug-module</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion sandbox-mgr-module/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.alibaba.jvm.sandbox</groupId>
<artifactId>sandbox-module-starter</artifactId>
<version>1.3.3</version>
<version>1.3.4</version>
<relativePath>../sandbox-module-starter/pom.xml</relativePath>
</parent>
<artifactId>sandbox-mgr-module</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion sandbox-mgr-provider/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>sandbox</artifactId>
<groupId>com.alibaba.jvm.sandbox</groupId>
<version>1.3.3</version>
<version>1.3.4</version>
</parent>
<artifactId>sandbox-mgr-provider</artifactId>
<name>sandbox-mgr-provider ${sandbox.version}</name>
Expand Down
2 changes: 1 addition & 1 deletion sandbox-module-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.alibaba.jvm.sandbox</groupId>
<artifactId>sandbox</artifactId>
<version>1.3.3</version>
<version>1.3.4</version>
</parent>
<artifactId>sandbox-module-starter</artifactId>
<name>sandbox-module-starter ${sandbox.version}</name>
Expand Down
2 changes: 1 addition & 1 deletion sandbox-provider-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>sandbox</artifactId>
<groupId>com.alibaba.jvm.sandbox</groupId>
<version>1.3.3</version>
<version>1.3.4</version>
</parent>
<artifactId>sandbox-provider-api</artifactId>
<name>sandbox-provider-api ${sandbox.version}</name>
Expand Down
2 changes: 1 addition & 1 deletion sandbox-spy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.alibaba.jvm.sandbox</groupId>
<artifactId>sandbox</artifactId>
<version>1.3.3</version>
<version>1.3.4</version>
</parent>
<artifactId>sandbox-spy</artifactId>
<name>sandbox-spy ${sandbox.version}</name>
Expand Down