aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject svn commit: r1710765 - /aries/trunk/spi-fly/spi-fly-weaver/src/main/java/org/apache/aries/spifly/weaver/TCCLSetterVisitor.java
Date Tue, 27 Oct 2015 10:47:25 GMT
Author: davidb
Date: Tue Oct 27 10:47:25 2015
New Revision: 1710765

URL: http://svn.apache.org/viewvc?rev=1710765&view=rev
Log:
ARIES-1437 Use ASM5 Opcodes instead of the ASM4 and implement ASM 5 visitor api.

Applying patch on behalf of Romain Gilles with many thanks!

Modified:
    aries/trunk/spi-fly/spi-fly-weaver/src/main/java/org/apache/aries/spifly/weaver/TCCLSetterVisitor.java

Modified: aries/trunk/spi-fly/spi-fly-weaver/src/main/java/org/apache/aries/spifly/weaver/TCCLSetterVisitor.java
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-weaver/src/main/java/org/apache/aries/spifly/weaver/TCCLSetterVisitor.java?rev=1710765&r1=1710764&r2=1710765&view=diff
==============================================================================
--- aries/trunk/spi-fly/spi-fly-weaver/src/main/java/org/apache/aries/spifly/weaver/TCCLSetterVisitor.java
(original)
+++ aries/trunk/spi-fly/spi-fly-weaver/src/main/java/org/apache/aries/spifly/weaver/TCCLSetterVisitor.java
Tue Oct 27 10:47:25 2015
@@ -59,7 +59,7 @@ public class TCCLSetterVisitor extends C
     private boolean woven = false;
 
     public TCCLSetterVisitor(ClassVisitor cv, String className, Set<WeavingData> weavingData)
{
-        super(Opcodes.ASM4, cv);
+        super(Opcodes.ASM5, cv);
         this.targetClass = Type.getType("L" + className.replace('.', '/') + ";");
         this.weavingData = weavingData;
     }
@@ -142,7 +142,7 @@ public class TCCLSetterVisitor extends C
         Type lastLDCType;
 
         public TCCLSetterMethodVisitor(MethodVisitor mv, int access, String name, String
descriptor) {
-            super(Opcodes.ASM4, mv, access, name, descriptor);
+            super(Opcodes.ASM5, mv, access, name, descriptor);
         }
 
         /**
@@ -166,7 +166,7 @@ public class TCCLSetterVisitor extends C
          *  Util.restoreContextClassloader();
          */
         @Override
-        public void visitMethodInsn(int opcode, String owner, String name, String desc) {
+        public void visitMethodInsn(int opcode, String owner, String name, String desc, boolean
itf) {
             WeavingData wd = findWeavingData(owner, name, desc);
             if (opcode == INVOKESTATIC && wd != null) {
                 additionalImportRequired = true;
@@ -203,7 +203,7 @@ public class TCCLSetterVisitor extends C
                     Type.VOID_TYPE, new Type[] {CLASS_TYPE}));
 
                 //Call the original instruction
-                super.visitMethodInsn(opcode, owner, name, desc);
+                super.visitMethodInsn(opcode, owner, name, desc, itf);
 
                 //If no exception then go to the finally (finally blocks are a catch block
with a jump)
                 Label afterCatch = newLabel();
@@ -221,7 +221,7 @@ public class TCCLSetterVisitor extends C
                 //Run the restore and continue
                 invokeStatic(UTIL_CLASS, new Method("restoreContextClassloader", Type.VOID_TYPE,
new Type[0]));
             } else {
-                super.visitMethodInsn(opcode, owner, name, desc);
+                super.visitMethodInsn(opcode, owner, name, desc, itf);
             }
         }
 



Mime
View raw message