Skip to content

Commit

Permalink
Merge pull request #162 from GateNLP/issue-160
Browse files Browse the repository at this point in the history
Update ASM visitors to support newer class versions
  • Loading branch information
ianroberts authored Feb 24, 2023
2 parents 1fe5209 + 78c5dab commit ee80b12
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/main/java/gate/creole/Plugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@ public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
// we've found a CreoleResource annotation on this class
if(desc.equals(CREOLE_RESOURCE_DESC)) {
foundCreoleResource = true;
return new AnnotationVisitor(Opcodes.ASM5) {
return new AnnotationVisitor(Opcodes.ASM9) {
@Override
public void visit(String name, Object value) {
if(name.equals("name") && resInfo.getResourceName() == null) {
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/gate/util/asm/commons/EmptyVisitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

public class EmptyVisitor extends ClassVisitor {

AnnotationVisitor av = new AnnotationVisitor(Opcodes.ASM5) {
AnnotationVisitor av = new AnnotationVisitor(Opcodes.ASM9) {

@Override
public AnnotationVisitor visitAnnotation(String name, String desc) {
Expand All @@ -24,7 +24,7 @@ public AnnotationVisitor visitArray(String name) {
};

public EmptyVisitor() {
super(Opcodes.ASM5);
super(Opcodes.ASM9);
}

@Override
Expand All @@ -41,7 +41,7 @@ public AnnotationVisitor visitTypeAnnotation(int typeRef,
@Override
public FieldVisitor visitField(int access, String name, String desc,
String signature, Object value) {
return new FieldVisitor(Opcodes.ASM5) {
return new FieldVisitor(Opcodes.ASM9) {

@Override
public AnnotationVisitor visitAnnotation(String desc,
Expand All @@ -60,7 +60,7 @@ public AnnotationVisitor visitTypeAnnotation(int typeRef,
@Override
public MethodVisitor visitMethod(int access, String name, String desc,
String signature, String[] exceptions) {
return new MethodVisitor(Opcodes.ASM5) {
return new MethodVisitor(Opcodes.ASM9) {

@Override
public AnnotationVisitor visitAnnotationDefault() {
Expand Down

0 comments on commit ee80b12

Please sign in to comment.