[Git][java-team/bridge-method-injector][upstream] New upstream version 1.23
Tony Mancill (@tmancill)
gitlab at salsa.debian.org
Tue Jun 14 05:20:31 BST 2022
Tony Mancill pushed to branch upstream at Debian Java Maintainers / bridge-method-injector
Commits:
27adacce by tony mancill at 2022-06-13T20:55:52-07:00
New upstream version 1.23
- - - - -
6 changed files:
- annotation/pom.xml
- injector/pom.xml
- injector/src/main/java/com/infradna/tool/bridge_method_injector/ClassAnnotationInjector.java
- injector/src/main/java/com/infradna/tool/bridge_method_injector/MethodInjector.java
- injector/src/main/java/com/infradna/tool/bridge_method_injector/ProcessMojo.java
- pom.xml
Changes:
=====================================
annotation/pom.xml
=====================================
@@ -3,7 +3,7 @@
<parent>
<groupId>com.infradna.tool</groupId>
<artifactId>bridge-method-injector-parent</artifactId>
- <version>1.18</version>
+ <version>1.23</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>bridge-method-annotation</artifactId>
@@ -13,7 +13,14 @@
<dependency>
<groupId>org.jenkins-ci</groupId>
<artifactId>annotation-indexer</artifactId>
- <version>1.4</version>
+ <version>1.15</version>
</dependency>
</dependencies>
+
+ <repositories>
+ <repository>
+ <id>Jenkins-CI</id>
+ <url>http://repo.jenkins-ci.org/releases/</url>
+ </repository>
+ </repositories>
</project>
=====================================
injector/pom.xml
=====================================
@@ -3,7 +3,7 @@
<parent>
<groupId>com.infradna.tool</groupId>
<artifactId>bridge-method-injector-parent</artifactId>
- <version>1.18</version>
+ <version>1.23</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>bridge-method-injector</artifactId>
@@ -12,13 +12,23 @@
<name>bridge-method-injector</name>
<description>Evolve your classes without breaking compatibility</description>
+ <properties>
+ <asm.version>9.2</asm.version>
+ </properties>
+
<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>
@@ -136,7 +146,7 @@
<scm>
<connection>scm:git:git at github.com:infradna/bridge-method-injector.git</connection>
- <tag>bridge-method-injector-parent-1.18</tag>
+ <tag>bridge-method-injector-parent-1.23</tag>
</scm>
<developers>
@@ -162,13 +172,18 @@
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
- <artifactId>asm-debug-all</artifactId>
- <version>5.2</version>
+ <artifactId>asm</artifactId>
+ <version>${asm.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm-commons</artifactId>
+ <version>${asm.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>3.8.1</version>
+ <version>4.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
=====================================
injector/src/main/java/com/infradna/tool/bridge_method_injector/ClassAnnotationInjector.java
=====================================
@@ -35,7 +35,7 @@ import org.objectweb.asm.Opcodes;
*/
abstract class ClassAnnotationInjector extends ClassVisitor {
ClassAnnotationInjector(ClassVisitor cv) {
- super(Opcodes.ASM5, cv);
+ super(Opcodes.ASM9, cv);
}
private boolean emitted = false;
=====================================
injector/src/main/java/com/infradna/tool/bridge_method_injector/MethodInjector.java
=====================================
@@ -139,12 +139,12 @@ public class MethodInjector {
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) {
@@ -284,7 +284,7 @@ public class MethodInjector {
}
Transformer(ClassVisitor cv) {
- super(Opcodes.ASM5, cv);
+ super(Opcodes.ASM9, cv);
}
@Override
@@ -306,7 +306,7 @@ public class MethodInjector {
@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);
=====================================
injector/src/main/java/com/infradna/tool/bridge_method_injector/ProcessMojo.java
=====================================
@@ -27,17 +27,18 @@ import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
-import java.io.BufferedReader;
import java.io.File;
-import java.io.FileInputStream;
import java.io.IOException;
-import java.io.InputStreamReader;
+import java.net.URL;
+import java.net.URLClassLoader;
+import org.jvnet.hudson.annotation_indexer.Index;
/**
* @author Kohsuke Kawaguchi
* @goal process
* @phase process-classes
* @requiresDependencyResolution runtime
+ * @threadSafe
*/
public class ProcessMojo extends AbstractMojo {
/**
@@ -49,28 +50,14 @@ public class ProcessMojo extends AbstractMojo {
private File classesDirectory;
public void execute() throws MojoExecutionException, MojoFailureException {
- File index = new File(classesDirectory, "META-INF/annotations/" + WithBridgeMethods.class.getName());
- if (!index.exists()) {
- getLog().debug("Skipping because there's no "+index);
- return;
- }
-
- BufferedReader r = null;
try {
- r = new BufferedReader(new InputStreamReader(new FileInputStream(index),"UTF-8"));
- String line;
- while ((line=r.readLine())!=null) {
+ for (String line : Index.listClassNames(WithBridgeMethods.class, new URLClassLoader(new URL[] {classesDirectory.toURI().toURL()}, ClassLoader.getSystemClassLoader().getParent()))) {
File classFile = new File(classesDirectory,line.replace('.','/')+".class");
getLog().debug("Processing "+line);
new MethodInjector().handle(classFile);
}
} catch (IOException e) {
throw new MojoExecutionException("Failed to process @WithBridgeMethods",e);
- } finally {
- try {
- if (r!=null) r.close();
- } catch (IOException _) {
- }
}
}
}
=====================================
pom.xml
=====================================
@@ -3,7 +3,7 @@
<groupId>com.infradna.tool</groupId>
<artifactId>bridge-method-injector-parent</artifactId>
- <version>1.18</version>
+ <version>1.23</version>
<packaging>pom</packaging>
<name>Bridge Method Injection Parent POM</name>
@@ -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>
@@ -52,24 +53,25 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.7</version>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
</plugin>
</plugins>
- <extensions>
- <extension>
- <groupId>org.jvnet.wagon-svn</groupId>
- <artifactId>wagon-svn</artifactId>
- <version>1.9</version>
- </extension>
- </extensions>
</build>
+ <repositories>
+ <repository>
+ <id>repo.jenkins-ci.org</id>
+ <url>https://repo.jenkins-ci.org/public/</url>
+ </repository>
+ </repositories>
+
<scm>
<connection>scm:git:git at github.com:infradna/bridge-method-injector.git</connection>
<url>https://github.com/infradna/bridge-method-injector</url>
- <tag>bridge-method-injector-parent-1.18</tag>
+ <tag>bridge-method-injector-parent-1.23</tag>
</scm>
<developers>
@@ -112,7 +114,7 @@
</plugin>
</plugins>
</reporting>
-
+
<profiles>
<profile>
<id>release</id>
View it on GitLab: https://salsa.debian.org/java-team/bridge-method-injector/-/commit/27adacce4994c56f8ebcbd43566975fe07e76d93
--
View it on GitLab: https://salsa.debian.org/java-team/bridge-method-injector/-/commit/27adacce4994c56f8ebcbd43566975fe07e76d93
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20220614/dd3ac722/attachment.htm>
More information about the pkg-java-commits
mailing list