diff options
author | Julien Eluard <[email protected]> | 2014-11-30 17:42:59 -0300 |
---|---|---|
committer | Julien Eluard <[email protected]> | 2014-11-30 17:42:59 -0300 |
commit | 810923ceba90687b5947784019c23e3868d66f92 (patch) | |
tree | 2b6c8ccd561d356eee8684712ddb53d08899911d | |
parent | 3a986013a1799caf74a63e5a87737a0d901418a6 (diff) | |
parent | df131d1fc3649757d1b03f7f570aee826d3d6347 (diff) |
Merge pull request #53 from skuzzle/master
Upgrade to ASM 5.0.3
-rwxr-xr-x | api/pom.xml | 12 | ||||
-rw-r--r-- | api/src/main/java/org/osjava/jardiff/ClassInfoVisitor.java | 15 |
2 files changed, 17 insertions, 10 deletions
diff --git a/api/pom.xml b/api/pom.xml index 6790346..6f2ee55 100755 --- a/api/pom.xml +++ b/api/pom.xml @@ -20,11 +20,11 @@ <version>2.0.0</version> </dependency> <dependency> - <groupId>asm</groupId> + <groupId>org.ow2.asm</groupId> <artifactId>asm</artifactId> </dependency> <dependency> - <groupId>asm</groupId> + <groupId>org.ow2.asm</groupId> <artifactId>asm-commons</artifactId> </dependency> <dependency> @@ -48,14 +48,14 @@ <dependencyManagement> <dependencies> <dependency> - <groupId>asm</groupId> + <groupId>org.ow2.asm</groupId> <artifactId>asm</artifactId> - <version>3.2</version> + <version>5.0.3</version> </dependency> <dependency> - <groupId>asm</groupId> + <groupId>org.ow2.asm</groupId> <artifactId>asm-commons</artifactId> - <version>3.2</version> + <version>5.0.3</version> </dependency> </dependencies> </dependencyManagement> diff --git a/api/src/main/java/org/osjava/jardiff/ClassInfoVisitor.java b/api/src/main/java/org/osjava/jardiff/ClassInfoVisitor.java index 890b589..be7d08b 100644 --- a/api/src/main/java/org/osjava/jardiff/ClassInfoVisitor.java +++ b/api/src/main/java/org/osjava/jardiff/ClassInfoVisitor.java @@ -18,9 +18,10 @@ package org.osjava.jardiff; import java.util.HashMap; import java.util.Map; +import org.objectweb.asm.ClassVisitor; import org.objectweb.asm.FieldVisitor; import org.objectweb.asm.MethodVisitor; -import org.objectweb.asm.commons.EmptyVisitor; +import org.objectweb.asm.Opcodes; /** * A reusable class which uses the ASM to build up ClassInfo about a @@ -28,7 +29,7 @@ import org.objectweb.asm.commons.EmptyVisitor; * * @author <a href="mailto:[email protected]">Antony Riley</a> */ -public class ClassInfoVisitor extends EmptyVisitor +public class ClassInfoVisitor extends ClassVisitor { /** * The class file version. @@ -71,6 +72,10 @@ public class ClassInfoVisitor extends EmptyVisitor */ private Map<String, FieldInfo> fieldMap; + public ClassInfoVisitor() { + super(Opcodes.ASM5); + } + /** * Reset this ClassInfoVisitor so that it can be used to visit another * class. @@ -107,7 +112,8 @@ public class ClassInfoVisitor extends EmptyVisitor this.supername = supername; this.interfaces = interfaces; } - + + @Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { methodMap.put(name + desc, new MethodInfo(access, name, desc, @@ -115,10 +121,11 @@ public class ClassInfoVisitor extends EmptyVisitor return null; } + @Override public FieldVisitor visitField(int access, String name, String desc, String signature, Object value) { fieldMap.put(name, new FieldInfo(access, name, desc, signature, value)); - return this; + return null; } } |