Skip to content

Commit

Permalink
Merged the essence of pull request #24
Browse files Browse the repository at this point in the history
  • Loading branch information
kohsuke committed May 12, 2021
2 parents 4c16ede + 806815c commit 43f48b2
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 12 deletions.
19 changes: 15 additions & 4 deletions injector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,17 @@

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.6.0</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -162,8 +168,13 @@
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-debug-all</artifactId>
<version>5.2</version>
<artifactId>asm</artifactId>
<version>9.0</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-commons</artifactId>
<version>9.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
*/
abstract class ClassAnnotationInjector extends ClassVisitor {
ClassAnnotationInjector(ClassVisitor cv) {
super(Opcodes.ASM5, cv);
super(Opcodes.ASM9, cv);
}

private boolean emitted = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,12 @@ private static class WithBridgeMethodsAnnotationVisitor extends AnnotationVisito
protected List<Type> types = new ArrayList<Type>();

public WithBridgeMethodsAnnotationVisitor(AnnotationVisitor av) {
super(Opcodes.ASM5, av);
super(Opcodes.ASM9, av);
}

@Override
public AnnotationVisitor visitArray(String name) {
return new AnnotationVisitor(Opcodes.ASM5, super.visitArray(name)) {
return new AnnotationVisitor(Opcodes.ASM9, super.visitArray(name)) {

public void visit(String name, Object value) {
if (value instanceof Type) {
Expand Down Expand Up @@ -284,7 +284,7 @@ private void insertAdapterMethod(GeneratorAdapter ga) {
}

Transformer(ClassVisitor cv) {
super(Opcodes.ASM5, cv);
super(Opcodes.ASM9, cv);
}

@Override
Expand All @@ -306,7 +306,7 @@ public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
@Override
public MethodVisitor visitMethod(final int access, final String name, final String mdesc, final String signature, final String[] exceptions) {
MethodVisitor mv = super.visitMethod(access, name, mdesc, signature, exceptions);
return new MethodVisitor(Opcodes.ASM5, mv) {
return new MethodVisitor(Opcodes.ASM9, mv) {
@Override
public AnnotationVisitor visitAnnotation(String adesc, boolean visible) {
AnnotationVisitor av = super.visitAnnotation(adesc, visible);
Expand Down
14 changes: 11 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -60,6 +61,13 @@
</plugins>
</build>

<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
</repository>
</repositories>

<scm>
<connection>scm:git:git@github.com:infradna/bridge-method-injector.git</connection>
<url>https://github.com/infradna/bridge-method-injector</url>
Expand Down Expand Up @@ -106,7 +114,7 @@
</plugin>
</plugins>
</reporting>

<profiles>
<profile>
<id>release</id>
Expand Down

0 comments on commit 43f48b2

Please sign in to comment.