Skip to content

Commit

Permalink
Update ASM to 9.4 (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum authored Oct 15, 2022
1 parent db7d412 commit a0c7d46
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions jar_jar.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ def _http_jar_with_servers(name, path, sha256, servers):
def jar_jar_repositories(servers=["https://repo1.maven.org/maven2"]):
_http_jar_with_servers(
name = "bazel_jar_jar_asm",
path = "/org/ow2/asm/asm/7.0/asm-7.0.jar",
sha256 = "b88ef66468b3c978ad0c97fd6e90979e56155b4ac69089ba7a44e9aa7ffe9acf",
path = "/org/ow2/asm/asm/9.4/asm-9.4.jar",
sha256 = "39d0e2b3dc45af65a09b097945750a94a126e052e124f93468443a1d0e15f381",
servers = servers,
)
_http_jar_with_servers(
name = "bazel_jar_jar_asm_commons",
path = "/org/ow2/asm/asm-commons/7.0/asm-commons-7.0.jar",
sha256 = "fed348ef05958e3e846a3ac074a12af5f7936ef3d21ce44a62c4fa08a771927d",
path = "/org/ow2/asm/asm-commons/9.4/asm-commons-9.4.jar",
sha256 = "0c128a9ec3f33c98959272f6d16cf14247b508f58951574bcdbd2b56d6326364",
servers = servers,
)
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,23 @@
public class EmptyClassVisitor extends ClassVisitor {

public EmptyClassVisitor() {
super(Opcodes.ASM7);
super(Opcodes.ASM9);
}

@Override
public MethodVisitor visitMethod(int access, String name, String desc,
String signature, String[] exceptions) {
return new MethodVisitor(Opcodes.ASM7) {};
return new MethodVisitor(Opcodes.ASM9) {};
}

@Override
public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
return new AnnotationVisitor(Opcodes.ASM7) {};
return new AnnotationVisitor(Opcodes.ASM9) {};
}

@Override
public FieldVisitor visitField(int access, String name, String desc, String signature, Object value) {
return new FieldVisitor(Opcodes.ASM7) {};
return new FieldVisitor(Opcodes.ASM9) {};
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ private class MethodSignatureRemapperMethodVisitor extends MethodVisitor {
private boolean rewriteNextLdcInstruction = false;

private MethodSignatureRemapperMethodVisitor(MethodVisitor methodVisitor) {
super(Opcodes.ASM7, methodVisitor);
super(Opcodes.ASM9, methodVisitor);
}

private boolean shouldMarkNextLdcForRewrite(int opcode, String name) {
Expand Down Expand Up @@ -97,7 +97,7 @@ public void visitLdcInsn(Object value) {
}

public MethodSignatureRemapperClassVisitor(ClassVisitor classVisitor) {
super(Opcodes.ASM7, classVisitor);
super(Opcodes.ASM9, classVisitor);
}

@Override
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/github/johnynek/jarjar/StringReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ abstract class StringReader extends ClassVisitor
private String className;

public StringReader() {
super(Opcodes.ASM7);
super(Opcodes.ASM9);
}

abstract public void visitString(String className, String value, int line);
Expand All @@ -42,7 +42,7 @@ public void visit(int version, int access, String name, String signature, String

public FieldVisitor visitField(int access, String name, String desc, String signature, Object value) {
handleObject(value);
return new FieldVisitor(Opcodes.ASM7){
return new FieldVisitor(Opcodes.ASM9){
@Override
public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
return StringReader.this.visitAnnotation(desc, visible);
Expand All @@ -52,7 +52,7 @@ public AnnotationVisitor visitAnnotation(String desc, boolean visible) {

@Override
public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
return new AnnotationVisitor(Opcodes.ASM7) {
return new AnnotationVisitor(Opcodes.ASM9) {
@Override
public void visit(String name, Object value) {
handleObject(value);
Expand All @@ -71,7 +71,7 @@ public AnnotationVisitor visitAnnotation(String name, String desc) {
@Override
public MethodVisitor visitMethod(int access, String name, String desc,
String signature, String[] exceptions) {
MethodVisitor mv = new MethodVisitor(Opcodes.ASM7){
MethodVisitor mv = new MethodVisitor(Opcodes.ASM9){
@Override
public void visitLdcInsn(Object cst) {
handleObject(cst);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class GetNameClassWriter extends ClassVisitor
private String className;

public GetNameClassWriter(int flags) {
super(Opcodes.ASM7,new ClassWriter(flags));
super(Opcodes.ASM9,new ClassWriter(flags));
}

public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ private static class VerifyingClassVisitor extends ClassVisitor {

private static class VerifyingMethodVisitor extends MethodVisitor {
private VerifyingMethodVisitor() {
super(Opcodes.ASM7);
super(Opcodes.ASM9);
}

@Override
Expand All @@ -32,7 +32,7 @@ public void visitLdcInsn(Object value) {
}

private VerifyingClassVisitor() {
super(Opcodes.ASM7);
super(Opcodes.ASM9);
}

@Override
Expand Down

0 comments on commit a0c7d46

Please sign in to comment.