Port to lastest objectweb-asm
Signed-off-by: Mikolaj Izdebski <mizdebsk@redhat.com>
This commit is contained in:
parent
063d173f80
commit
146e3bcc1f
8
.gitignore
vendored
8
.gitignore
vendored
@ -1,2 +1,6 @@
|
||||
plexus-containers-1.5.4.tar.xz
|
||||
/plexus-containers-1.5.5.tar.xz
|
||||
/plexus-containers-*.tar.xz
|
||||
/plexus-containers-*/
|
||||
/.build-*.log
|
||||
/.project
|
||||
/*.src.rpm
|
||||
/noarch
|
||||
|
||||
235
0003-Port-to-objectweb-asm-5.patch
Normal file
235
0003-Port-to-objectweb-asm-5.patch
Normal file
@ -0,0 +1,235 @@
|
||||
From c7a9d9ecab6ceb464b41d833fef49b6c2bb0e616 Mon Sep 17 00:00:00 2001
|
||||
From: rpm-build <rpm-build>
|
||||
Date: Fri, 4 Jul 2014 16:23:21 +0100
|
||||
Subject: [PATCH 3/3] Port to objectweb-asm 5
|
||||
|
||||
---
|
||||
plexus-component-metadata/pom.xml | 6 +-
|
||||
.../codehaus/plexus/metadata/ann/AnnReader.java | 124 ++-------------------
|
||||
2 files changed, 12 insertions(+), 118 deletions(-)
|
||||
|
||||
diff --git a/plexus-component-metadata/pom.xml b/plexus-component-metadata/pom.xml
|
||||
index adfb80c..e42be8a 100644
|
||||
--- a/plexus-component-metadata/pom.xml
|
||||
+++ b/plexus-component-metadata/pom.xml
|
||||
@@ -59,9 +59,9 @@
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
- <groupId>asm</groupId>
|
||||
- <artifactId>asm</artifactId>
|
||||
- <version>3.1</version>
|
||||
+ <groupId>org.ow2.asm</groupId>
|
||||
+ <artifactId>asm-all</artifactId>
|
||||
+ <version>5.0.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
diff --git a/plexus-component-metadata/src/main/java/org/codehaus/plexus/metadata/ann/AnnReader.java b/plexus-component-metadata/src/main/java/org/codehaus/plexus/metadata/ann/AnnReader.java
|
||||
index 9ff59ac..cb4d45d 100644
|
||||
--- a/plexus-component-metadata/src/main/java/org/codehaus/plexus/metadata/ann/AnnReader.java
|
||||
+++ b/plexus-component-metadata/src/main/java/org/codehaus/plexus/metadata/ann/AnnReader.java
|
||||
@@ -21,21 +21,21 @@ import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.objectweb.asm.AnnotationVisitor;
|
||||
-import org.objectweb.asm.Attribute;
|
||||
import org.objectweb.asm.ClassReader;
|
||||
import org.objectweb.asm.ClassVisitor;
|
||||
import org.objectweb.asm.FieldVisitor;
|
||||
-import org.objectweb.asm.Label;
|
||||
import org.objectweb.asm.MethodVisitor;
|
||||
+import org.objectweb.asm.Opcodes;
|
||||
|
||||
/**
|
||||
* @author Eugene Kuleshov
|
||||
*/
|
||||
-public class AnnReader implements ClassVisitor {
|
||||
+public class AnnReader extends ClassVisitor {
|
||||
|
||||
private final AnnClass annClass;
|
||||
|
||||
private AnnReader(AnnClass annClass) {
|
||||
+ super(Opcodes.ASM5);
|
||||
this.annClass = annClass;
|
||||
}
|
||||
|
||||
@@ -64,19 +64,13 @@ public class AnnReader implements ClassVisitor {
|
||||
public FieldVisitor visitField(int access, final String name, final String desc, String signature, Object value) {
|
||||
final AnnField field = new AnnField(annClass, access, name, desc);
|
||||
annClass.addField(field);
|
||||
- return new FieldVisitor() {
|
||||
+ return new FieldVisitor(Opcodes.ASM5) {
|
||||
|
||||
public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
|
||||
Ann ann = new Ann(desc);
|
||||
field.addAnn(ann);
|
||||
return new AnnAnnReader(ann);
|
||||
}
|
||||
-
|
||||
- public void visitAttribute(Attribute attr) {
|
||||
- }
|
||||
-
|
||||
- public void visitEnd() {
|
||||
- }
|
||||
};
|
||||
}
|
||||
|
||||
@@ -85,7 +79,7 @@ public class AnnReader implements ClassVisitor {
|
||||
final AnnMethod method = new AnnMethod(annClass, access, mname, mdesc);
|
||||
annClass.addMethod(method);
|
||||
|
||||
- return new MethodVisitor() {
|
||||
+ return new MethodVisitor(Opcodes.ASM5) {
|
||||
|
||||
public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
|
||||
Ann ann = new Ann(desc);
|
||||
@@ -98,98 +92,14 @@ public class AnnReader implements ClassVisitor {
|
||||
method.addParamAnn(parameter, ann);
|
||||
return new AnnAnnReader(ann);
|
||||
}
|
||||
-
|
||||
- public AnnotationVisitor visitAnnotationDefault() {
|
||||
- // TODO
|
||||
- return null;
|
||||
- }
|
||||
-
|
||||
- public void visitAttribute(Attribute attr) {
|
||||
- }
|
||||
-
|
||||
- public void visitCode() {
|
||||
- }
|
||||
-
|
||||
- public void visitFieldInsn(int opcode, String owner, String name, String desc) {
|
||||
- }
|
||||
-
|
||||
- public void visitFrame(int type, int local, Object[] local2, int stack, Object[] stack2) {
|
||||
- }
|
||||
-
|
||||
- public void visitIincInsn(int var, int increment) {
|
||||
- }
|
||||
-
|
||||
- public void visitInsn(int opcode) {
|
||||
- }
|
||||
-
|
||||
- public void visitIntInsn(int opcode, int operand) {
|
||||
- }
|
||||
-
|
||||
- public void visitJumpInsn(int opcode, Label label) {
|
||||
- }
|
||||
-
|
||||
- public void visitLabel(Label label) {
|
||||
- }
|
||||
-
|
||||
- public void visitLdcInsn(Object cst) {
|
||||
- }
|
||||
-
|
||||
- public void visitMethodInsn(int opcode, String owner, String name, String desc) {
|
||||
- }
|
||||
-
|
||||
- public void visitMultiANewArrayInsn(String desc, int dims) {
|
||||
- }
|
||||
-
|
||||
- public void visitLookupSwitchInsn(Label dflt, int[] keys, Label[] labels) {
|
||||
- }
|
||||
-
|
||||
- public void visitTableSwitchInsn(int min, int max, Label dflt, Label[] labels) {
|
||||
- }
|
||||
-
|
||||
- public void visitTypeInsn(int opcode, String type) {
|
||||
- }
|
||||
-
|
||||
- public void visitVarInsn(int opcode, int var) {
|
||||
- }
|
||||
-
|
||||
- public void visitMaxs(int maxStack, int maxLocals) {
|
||||
- }
|
||||
-
|
||||
- public void visitLocalVariable(String name, String desc,
|
||||
- String signature, Label start, Label end, int index) {
|
||||
- }
|
||||
-
|
||||
- public void visitTryCatchBlock(Label start, Label end, Label handler, String type) {
|
||||
- }
|
||||
-
|
||||
- public void visitLineNumber(int line, Label start) {
|
||||
- }
|
||||
-
|
||||
- public void visitEnd() {
|
||||
- }
|
||||
-
|
||||
};
|
||||
}
|
||||
|
||||
- public void visitInnerClass(String name, String outer, String inner, int access) {
|
||||
- }
|
||||
-
|
||||
- public void visitOuterClass(String owner, String name, String desc) {
|
||||
- }
|
||||
-
|
||||
- public void visitAttribute(Attribute attr) {
|
||||
- }
|
||||
-
|
||||
- public void visitSource(String source, String debug) {
|
||||
- }
|
||||
-
|
||||
- public void visitEnd() {
|
||||
- }
|
||||
-
|
||||
- static class AnnAnnReader implements AnnotationVisitor {
|
||||
+ static class AnnAnnReader extends AnnotationVisitor {
|
||||
private Ann ann;
|
||||
|
||||
public AnnAnnReader(Ann ann) {
|
||||
+ super(Opcodes.ASM5);
|
||||
this.ann = ann;
|
||||
}
|
||||
|
||||
@@ -210,13 +120,9 @@ public class AnnReader implements ClassVisitor {
|
||||
public AnnotationVisitor visitArray(String name) {
|
||||
return new AnnAnnArrayReader(ann, name);
|
||||
}
|
||||
-
|
||||
- public void visitEnd() {
|
||||
- }
|
||||
-
|
||||
}
|
||||
|
||||
- static class AnnAnnArrayReader implements AnnotationVisitor {
|
||||
+ static class AnnAnnArrayReader extends AnnotationVisitor {
|
||||
|
||||
private Ann ann;
|
||||
|
||||
@@ -226,6 +132,7 @@ public class AnnReader implements ClassVisitor {
|
||||
private ArrayList<String> array = new ArrayList<String>();
|
||||
|
||||
public AnnAnnArrayReader(Ann ann, String name) {
|
||||
+ super(Opcodes.ASM5);
|
||||
this.ann = ann;
|
||||
this.name = name;
|
||||
}
|
||||
@@ -236,21 +143,8 @@ public class AnnReader implements ClassVisitor {
|
||||
}
|
||||
}
|
||||
|
||||
- public AnnotationVisitor visitAnnotation(String name, String value) {
|
||||
- return null;
|
||||
- }
|
||||
-
|
||||
- public AnnotationVisitor visitArray(String arg0) {
|
||||
- return null;
|
||||
- }
|
||||
-
|
||||
public void visitEnd() {
|
||||
ann.addParam(name, array.toArray(new String[array.size()]));
|
||||
}
|
||||
-
|
||||
- public void visitEnum(String arg0, String arg1, String arg2) {
|
||||
- }
|
||||
-
|
||||
}
|
||||
-
|
||||
}
|
||||
--
|
||||
1.9.0
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
Name: %{parent}-%{subname}
|
||||
Version: 1.5.5
|
||||
Release: 17%{?dist}
|
||||
Release: 18%{?dist}
|
||||
Summary: Containers for Plexus
|
||||
License: ASL 2.0 and MIT
|
||||
URL: http://plexus.codehaus.org/
|
||||
@ -24,6 +24,7 @@ Source3: plexus-containers-settings.xml
|
||||
|
||||
Patch0: 0001-Fix-test-oom.patch
|
||||
Patch1: 0002-Update-to-Plexus-Classworlds-2.5.patch
|
||||
Patch2: 0003-Port-to-objectweb-asm-5.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
@ -40,11 +41,13 @@ BuildRequires: plexus-utils
|
||||
BuildRequires: plexus-cli
|
||||
BuildRequires: xbean >= 3.14
|
||||
BuildRequires: guava
|
||||
BuildRequires: objectweb-asm >= 5.0.2
|
||||
|
||||
Requires: plexus-classworlds >= 2.5
|
||||
Requires: plexus-utils
|
||||
Requires: xbean >= 3.14
|
||||
Requires: guava
|
||||
Requires: objectweb-asm >= 5.0.2
|
||||
|
||||
|
||||
%description
|
||||
@ -103,6 +106,7 @@ cp %{SOURCE2} plexus-component-annotations/build.xml
|
||||
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
# For Maven 3 compat
|
||||
%pom_add_dep org.apache.maven:maven-core plexus-component-metadata
|
||||
@ -158,6 +162,9 @@ sed -i "s|<version>2.3</version>|<version> %{javadoc_plugin_version}</version>|"
|
||||
%files javadoc -f .mfiles-javadoc
|
||||
|
||||
%changelog
|
||||
* Fri Jul 04 2014 Mat Booth <mat.booth@redhat.com> - 1.5.5-18
|
||||
- Port to lastest objectweb-asm
|
||||
|
||||
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.5-17
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user