cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1543231 - in /cxf/branches/2.7.x-fixes: api/src/main/java/org/apache/cxf/common/util/ASMHelper.java rt/frontend/jaxrs/pom.xml rt/rs/extensions/providers/pom.xml
Date Mon, 18 Nov 2013 23:22:43 GMT
Author: dkulp
Date: Mon Nov 18 23:22:43 2013
New Revision: 1543231

URL: http://svn.apache.org/r1543231
Log:
Some more updates for checking to make sure the asm version we grab is actually usable

Modified:
    cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/common/util/ASMHelper.java
    cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/pom.xml
    cxf/branches/2.7.x-fixes/rt/rs/extensions/providers/pom.xml

Modified: cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/common/util/ASMHelper.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/common/util/ASMHelper.java?rev=1543231&r1=1543230&r2=1543231&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/common/util/ASMHelper.java (original)
+++ cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/common/util/ASMHelper.java Mon
Nov 18 23:22:43 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,18 +419,7 @@ public class ASMHelper {
             throw new RuntimeException(e);
         }
     }
-    
-    public boolean is3x() {
-        try {
-            final Class<?> cls = ClassLoaderUtils.loadClass(cwClass.getPackage().getName()
+ ".MethodVisitor", cwClass);
-            final Method m = cls.getMethod("visitFrame", Integer.TYPE, String.class,
-                                           String.class, String.class);            
-            return m != null;
-        } catch (Throwable t) {
-            return false;
-        }
-    }
-    
+        
     public interface ClassWriter {
         @WrapReturn(AnnotationVisitor.class)
         AnnotationVisitor visitAnnotation(String cls, boolean t);

Modified: cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/pom.xml?rev=1543231&r1=1543230&r2=1543231&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/pom.xml (original)
+++ cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/pom.xml Mon Nov 18 23:22:43 2013
@@ -143,6 +143,11 @@
             <scope>test</scope>
         </dependency>
         <dependency>
+            <groupId>asm</groupId>
+            <artifactId>asm</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-databinding-aegis</artifactId>
             <version>${project.version}</version>

Modified: cxf/branches/2.7.x-fixes/rt/rs/extensions/providers/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/rs/extensions/providers/pom.xml?rev=1543231&r1=1543230&r2=1543231&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/rs/extensions/providers/pom.xml (original)
+++ cxf/branches/2.7.x-fixes/rt/rs/extensions/providers/pom.xml Mon Nov 18 23:22:43 2013
@@ -66,8 +66,7 @@
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-frontend-jaxrs</artifactId>
             <version>${project.version}</version>
-        </dependency>
-        
+        </dependency> 
         <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-databinding-aegis</artifactId>
@@ -119,6 +118,11 @@
             <scope>test</scope>
         </dependency>
         <dependency>
+            <groupId>asm</groupId>
+            <artifactId>asm</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-databinding-jaxb</artifactId>
             <version>${project.version}</version>



Mime
View raw message