cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1543232 - /cxf/trunk/core/src/main/java/org/apache/cxf/common/util/ASMHelper.java
Date Mon, 18 Nov 2013 23:23:26 GMT
Author: dkulp
Date: Mon Nov 18 23:23:26 2013
New Revision: 1543232

URL: http://svn.apache.org/r1543232
Log:
ASM version check from 2.7.x

Modified:
    cxf/trunk/core/src/main/java/org/apache/cxf/common/util/ASMHelper.java

Modified: cxf/trunk/core/src/main/java/org/apache/cxf/common/util/ASMHelper.java
URL: http://svn.apache.org/viewvc/cxf/trunk/core/src/main/java/org/apache/cxf/common/util/ASMHelper.java?rev=1543232&r1=1543231&r2=1543232&view=diff
==============================================================================
--- cxf/trunk/core/src/main/java/org/apache/cxf/common/util/ASMHelper.java (original)
+++ cxf/trunk/core/src/main/java/org/apache/cxf/common/util/ASMHelper.java Mon Nov 18 23:23:26
2013
@@ -69,7 +69,13 @@ public class ASMHelper {
     private static void tryClass(String s) {
         if (cwClass == null) {
             try {
-                cwClass = ClassLoaderUtils.loadClass(s, ASMHelper.class);
+                Class<?> c2 = ClassLoaderUtils.loadClass(s, ASMHelper.class);
+                
+                //old versions don't have this, but we need it
+                Class<?> cls = ClassLoaderUtils.loadClass(c2.getPackage().getName()
+ ".MethodVisitor", c2);
+                cls.getMethod("visitFrame", Integer.TYPE, String.class,
+                              String.class, String.class);
+                cwClass = c2;
             } catch (Throwable t) {
                 //ignore
             }
@@ -413,7 +419,7 @@ public class ASMHelper {
             throw new RuntimeException(e);
         }
     }
-    
+        
     public interface ClassWriter {
         @WrapReturn(AnnotationVisitor.class)
         AnnotationVisitor visitAnnotation(String cls, boolean t);



Mime
View raw message