cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [1/4] git commit: [CXF-5673] Update to support latest ASM/XBean code Patch from Romain Manni-Bucau applied with updates
Date Sun, 06 Apr 2014 01:39:10 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes 454497ab9 -> 0cb272bd8


[CXF-5673] Update to support latest ASM/XBean code
Patch from Romain Manni-Bucau applied with updates


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/d010a127
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/d010a127
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/d010a127

Branch: refs/heads/2.7.x-fixes
Commit: d010a1278e4361c3e13842f033667d5f186acec5
Parents: 454497a
Author: Daniel Kulp <dkulp@apache.org>
Authored: Sat Apr 5 20:27:52 2014 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Sat Apr 5 20:27:52 2014 -0400

----------------------------------------------------------------------
 .../org/apache/cxf/common/jaxb/JAXBUtils.java   | 18 +++----
 .../org/apache/cxf/common/util/ASMHelper.java   |  4 +-
 .../util/ReflectionInvokationHandler.java       | 49 ++++++++++++++++++--
 .../cxf/binding/corba/utils/CorbaAnyHelper.java | 16 +++----
 .../endpoint/dynamic/TypeClassInitializer.java  |  2 +-
 .../apache/cxf/jaxb/JAXBContextInitializer.java |  4 +-
 .../apache/cxf/jaxb/WrapperHelperCompiler.java  | 42 ++++++++---------
 .../apache/cxf/jaxws/WrapperClassGenerator.java |  2 +-
 8 files changed, 90 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/d010a127/api/src/main/java/org/apache/cxf/common/jaxb/JAXBUtils.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/cxf/common/jaxb/JAXBUtils.java b/api/src/main/java/org/apache/cxf/common/jaxb/JAXBUtils.java
index 7e394e2..94810ce 100644
--- a/api/src/main/java/org/apache/cxf/common/jaxb/JAXBUtils.java
+++ b/api/src/main/java/org/apache/cxf/common/jaxb/JAXBUtils.java
@@ -1084,7 +1084,7 @@ public final class JAXBUtils {
             mv.visitVarInsn(Opcodes.ALOAD, 0);
             mv.visitVarInsn(Opcodes.ALOAD, 1);
             mv.visitMethodInsn(Opcodes.INVOKESPECIAL,
-                               superName, "<init>", "(Ljava/util/Map;)V");
+                               superName, "<init>", "(Ljava/util/Map;)V", false);
             Label l1 = helper.createLabel();
             mv.visitLabel(l1);
             mv.visitInsn(Opcodes.RETURN);
@@ -1139,7 +1139,7 @@ public final class JAXBUtils {
             mv.visitVarInsn(Opcodes.ALOAD, 0);
             mv.visitMethodInsn(Opcodes.INVOKESPECIAL, 
                                superName,
-                               "getPreDeclaredNamespaceUris", "()[Ljava/lang/String;");
+                               "getPreDeclaredNamespaceUris", "()[Ljava/lang/String;", false);
             mv.visitVarInsn(Opcodes.ASTORE, 1);
             l1 = helper.createLabel();
             mv.visitLabel(l1);
@@ -1160,8 +1160,8 @@ public final class JAXBUtils {
             mv.visitInsn(Opcodes.DUP);
             mv.visitVarInsn(Opcodes.ALOAD, 1);
             mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/util/Arrays", "asList", 
-                               "([Ljava/lang/Object;)Ljava/util/List;");
-            mv.visitMethodInsn(Opcodes.INVOKESPECIAL, "java/util/ArrayList", "<init>",
"(Ljava/util/Collection;)V");
+                               "([Ljava/lang/Object;)Ljava/util/List;", false);
+            mv.visitMethodInsn(Opcodes.INVOKESPECIAL, "java/util/ArrayList", "<init>",
"(Ljava/util/Collection;)V", false);
             mv.visitVarInsn(Opcodes.ASTORE, 2);
             Label l4 = helper.createLabel();
             mv.visitLabel(l4);
@@ -1181,7 +1181,7 @@ public final class JAXBUtils {
             mv.visitFieldInsn(Opcodes.GETFIELD, slashedName, "nsctxt", "[Ljava/lang/String;");
             mv.visitVarInsn(Opcodes.ILOAD, 3);
             mv.visitInsn(Opcodes.AALOAD);
-            mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "java/util/List", "remove", "(Ljava/lang/Object;)Z");
+            mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "java/util/List", "remove", "(Ljava/lang/Object;)Z",
true);
             mv.visitInsn(Opcodes.POP);
             Label l8 = helper.createLabel();
             mv.visitLabel(l8);
@@ -1201,10 +1201,10 @@ public final class JAXBUtils {
             mv.visitLineNumber(1044, l9);
             mv.visitVarInsn(Opcodes.ALOAD, 2);
             mv.visitVarInsn(Opcodes.ALOAD, 2);
-            mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "java/util/List", "size", "()I");
+            mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "java/util/List", "size", "()I",
true);
             mv.visitTypeInsn(Opcodes.ANEWARRAY, "java/lang/String");
             mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "java/util/List", 
-                               "toArray", "([Ljava/lang/Object;)[Ljava/lang/Object;");
+                               "toArray", "([Ljava/lang/Object;)[Ljava/lang/Object;", true);
             mv.visitTypeInsn(Opcodes.CHECKCAST, "[Ljava/lang/String;");
             mv.visitInsn(Opcodes.ARETURN);
             Label l10 = helper.createLabel();
@@ -1281,7 +1281,7 @@ public final class JAXBUtils {
         mv.visitLabel(l0);
         mv.visitLineNumber(32, l0);
         mv.visitVarInsn(Opcodes.ALOAD, 0);
-        mv.visitMethodInsn(Opcodes.INVOKESPECIAL, superName, "<init>", "()V");
+        mv.visitMethodInsn(Opcodes.INVOKESPECIAL, superName, "<init>", "()V", false);
         Label l1 = helper.createLabel();
         mv.visitLabel(l1);
         mv.visitLineNumber(29, l1);
@@ -1318,7 +1318,7 @@ public final class JAXBUtils {
         mv.visitFieldInsn(Opcodes.GETFIELD, postFixedName, "nspref", "Ljava/util/Map;");
         mv.visitVarInsn(Opcodes.ALOAD, 1);
         mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "java/util/Map", 
-                           "get", "(Ljava/lang/Object;)Ljava/lang/Object;");
+                           "get", "(Ljava/lang/Object;)Ljava/lang/Object;", true);
         mv.visitTypeInsn(Opcodes.CHECKCAST, "java/lang/String");
         mv.visitVarInsn(Opcodes.ASTORE, 4);
         l1 = helper.createLabel();

http://git-wip-us.apache.org/repos/asf/cxf/blob/d010a127/api/src/main/java/org/apache/cxf/common/util/ASMHelper.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/cxf/common/util/ASMHelper.java b/api/src/main/java/org/apache/cxf/common/util/ASMHelper.java
index b4cdcf0..f36db0d 100644
--- a/api/src/main/java/org/apache/cxf/common/util/ASMHelper.java
+++ b/api/src/main/java/org/apache/cxf/common/util/ASMHelper.java
@@ -32,6 +32,7 @@ import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.cxf.common.classloader.ClassLoaderUtils;
+import org.apache.cxf.common.util.ReflectionInvokationHandler.Optional;
 import org.apache.cxf.common.util.ReflectionInvokationHandler.UnwrapParam;
 import org.apache.cxf.common.util.ReflectionInvokationHandler.WrapReturn;
 
@@ -90,6 +91,7 @@ public class ASMHelper {
         if (cwClass == null) {
             //try the "real" asm first, then the others
             tryClass("org.objectweb.asm.ClassWriter"); 
+            tryClass("org.apache.xbean.asm5.ClassWriter"); 
             tryClass("org.apache.xbean.asm4.ClassWriter"); 
             tryClass("org.apache.xbean.asm.ClassWriter"); 
             tryClass("org.springframework.asm.ClassWriter");
@@ -464,7 +466,7 @@ public class ASMHelper {
                                 int i);
         void visitTypeInsn(int checkcast, String string);
         void visitMethodInsn(int invokevirtual, String periodToSlashes,
-                             String name, String methodSignature);
+                             String name, String methodSignature, @Optional boolean itf);
         void visitIntInsn(int sipush, int x);
         void visitIincInsn(int i, int j);
         void visitFieldInsn(int getfield, String periodToSlashes,

http://git-wip-us.apache.org/repos/asf/cxf/blob/d010a127/api/src/main/java/org/apache/cxf/common/util/ReflectionInvokationHandler.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/cxf/common/util/ReflectionInvokationHandler.java
b/api/src/main/java/org/apache/cxf/common/util/ReflectionInvokationHandler.java
index 2de38d9..5d26a01 100644
--- a/api/src/main/java/org/apache/cxf/common/util/ReflectionInvokationHandler.java
+++ b/api/src/main/java/org/apache/cxf/common/util/ReflectionInvokationHandler.java
@@ -48,14 +48,50 @@ public class ReflectionInvokationHandler implements InvocationHandler
{
     /** {@inheritDoc}*/
     public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
         WrapReturn wr = method.getAnnotation(WrapReturn.class);
+        final Class<?> targetClass = target.getClass();
+        Class<?>[] parameterTypes = getParameterTypes(method, args);
         try {
-            Method m = target.getClass().getMethod(method.getName(), getParameterTypes(method,
args));
+            Method m;
+            try {
+                m = targetClass.getMethod(method.getName(), parameterTypes);
+            } catch (NoSuchMethodException nsme) {
+                
+                boolean[] optionals = new boolean[method.getParameterTypes().length];
+                int i = 0;
+                int optionalNumber = 0;
+                for (final Annotation[] a : method.getParameterAnnotations()) {
+                    optionals[i] = false;
+                    for (final Annotation potential : a) {
+                        if (Optional.class.equals(potential.annotationType())) {
+                            optionals[i] = true;
+                            optionalNumber++;
+                            break;
+                        }
+                    }
+                    i++;
+                }
+                
+                Class<?>[] newParams = new Class<?>[args.length - optionalNumber];
+                Object[] newArgs = new Object[args.length - optionalNumber];
+                int argI = 0;
+                for (int j = 0; j < parameterTypes.length; j++) {
+                    if (optionals[j]) {
+                        continue;
+                    }
+                    newArgs[argI] = args[j];
+                    newParams[argI] = parameterTypes[j];
+                    argI++;
+                }
+                m = targetClass.getMethod(method.getName(), newParams);
+                args = newArgs;
+                parameterTypes = newParams;
+            }
             ReflectionUtil.setAccessible(m);
             return wrapReturn(wr, m.invoke(target, args));
         } catch (InvocationTargetException e) {
             throw e.getCause();
         } catch (NoSuchMethodException e) {
-            for (Method m2 : target.getClass().getMethods()) {
+            for (Method m2 : targetClass.getMethods()) {
                 if (m2.getName().equals(method.getName())
                     && m2.getParameterTypes().length == method.getParameterTypes().length)
{
                     boolean found = true;
@@ -118,11 +154,16 @@ public class ReflectionInvokationHandler implements InvocationHandler
{
         return createProxyWrapper(t, wr.value());
     }
     
-    public static final <T> T createProxyWrapper(Object target, Class<T> inf)
{
+    public static <T> T createProxyWrapper(Object target, Class<T> inf) {
         InvocationHandler h = new ReflectionInvokationHandler(target);
         return inf.cast(Proxy.newProxyInstance(inf.getClassLoader(), new Class[] {inf}, h));
     }
-    
+
+    @Target(ElementType.PARAMETER)
+    @Retention(RetentionPolicy.RUNTIME)
+    public static @interface Optional {
+    }
+
     @Target(ElementType.METHOD)
     @Retention(RetentionPolicy.RUNTIME)
     public static @interface WrapReturn {

http://git-wip-us.apache.org/repos/asf/cxf/blob/d010a127/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/CorbaAnyHelper.java
----------------------------------------------------------------------
diff --git a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/CorbaAnyHelper.java
b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/CorbaAnyHelper.java
index 610ab71..ce5ef82 100644
--- a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/CorbaAnyHelper.java
+++ b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/CorbaAnyHelper.java
@@ -337,7 +337,7 @@ public final class CorbaAnyHelper {
                           "obj", "Lorg/omg/CORBA/portable/Streamable;");
         mv.visitVarInsn(Opcodes.ALOAD, 1);
         mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "org/omg/CORBA/portable/Streamable",

-                           "_read", "(Lorg/omg/CORBA/portable/InputStream;)V");
+                           "_read", "(Lorg/omg/CORBA/portable/InputStream;)V", false);
         Label l3 = helper.createLabel();
         mv.visitJumpInsn(Opcodes.GOTO, l3);
         mv.visitLabel(l1);
@@ -347,7 +347,7 @@ public final class CorbaAnyHelper {
         mv.visitVarInsn(Opcodes.ALOAD, 2);
         mv.visitMethodInsn(Opcodes.INVOKESPECIAL, "com/sun/corba/se/impl/corba/AnyImpl",

                            "read_value", 
-                           "(Lorg/omg/CORBA/portable/InputStream;Lorg/omg/CORBA/TypeCode;)V");
+                           "(Lorg/omg/CORBA/portable/InputStream;Lorg/omg/CORBA/TypeCode;)V",
false);
         mv.visitLabel(l3);
         mv.visitLineNumber(59, l3);
         mv.visitInsn(Opcodes.RETURN);
@@ -381,7 +381,7 @@ public final class CorbaAnyHelper {
                           "obj", "Lorg/omg/CORBA/portable/Streamable;");
         mv.visitVarInsn(Opcodes.ALOAD, 1);
         mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "org/omg/CORBA/portable/Streamable",
-                           "_write", "(Lorg/omg/CORBA/portable/OutputStream;)V");
+                           "_write", "(Lorg/omg/CORBA/portable/OutputStream;)V", false);
         Label l3 = helper.createLabel();
         mv.visitJumpInsn(Opcodes.GOTO, l3);
         mv.visitLabel(l1);
@@ -389,7 +389,7 @@ public final class CorbaAnyHelper {
         mv.visitVarInsn(Opcodes.ALOAD, 0);
         mv.visitVarInsn(Opcodes.ALOAD, 1);
         mv.visitMethodInsn(Opcodes.INVOKESPECIAL, "com/sun/corba/se/impl/corba/AnyImpl",
-                           "write_value", "(Lorg/omg/CORBA/portable/OutputStream;)V");
+                           "write_value", "(Lorg/omg/CORBA/portable/OutputStream;)V", false);
         mv.visitLabel(l3);
         mv.visitLineNumber(66, l3);
         mv.visitInsn(Opcodes.RETURN);
@@ -427,7 +427,7 @@ public final class CorbaAnyHelper {
         mv.visitLineNumber(50, l1);
         mv.visitVarInsn(Opcodes.ALOAD, 0);
         mv.visitMethodInsn(Opcodes.INVOKESPECIAL, "com/sun/corba/se/impl/corba/AnyImpl",
-                           "extract_Streamable", "()Lorg/omg/CORBA/portable/Streamable;");
+                           "extract_Streamable", "()Lorg/omg/CORBA/portable/Streamable;",
false);
         mv.visitInsn(Opcodes.ARETURN);
         Label l3 = helper.createLabel();
         mv.visitLabel(l3);
@@ -450,7 +450,7 @@ public final class CorbaAnyHelper {
         mv.visitMethodInsn(Opcodes.INVOKESPECIAL, 
                            "com/sun/corba/se/impl/corba/AnyImpl", 
                            "insert_Streamable", 
-                           "(Lorg/omg/CORBA/portable/Streamable;)V");
+                           "(Lorg/omg/CORBA/portable/Streamable;)V", false);
         Label l1 = helper.createLabel();
         mv.visitLabel(l1);
         mv.visitLineNumber(44, l1);
@@ -483,7 +483,7 @@ public final class CorbaAnyHelper {
         mv.visitTypeInsn(Opcodes.CHECKCAST, "com/sun/corba/se/spi/orb/ORB");
         mv.visitMethodInsn(Opcodes.INVOKESPECIAL,
                            "com/sun/corba/se/impl/corba/AnyImpl",
-                           "<init>", "(Lcom/sun/corba/se/spi/orb/ORB;)V");
+                           "<init>", "(Lcom/sun/corba/se/spi/orb/ORB;)V", false);
         Label l1 = helper.createLabel();
         mv.visitLabel(l1);
         mv.visitLineNumber(37, l1);
@@ -512,7 +512,7 @@ public final class CorbaAnyHelper {
         mv.visitMethodInsn(Opcodes.INVOKESPECIAL,
                            "com/sun/corba/se/impl/corba/AnyImpl",
                            "<init>",
-                           "(Lcom/sun/corba/se/spi/orb/ORB;Lorg/omg/CORBA/Any;)V");
+                           "(Lcom/sun/corba/se/spi/orb/ORB;Lorg/omg/CORBA/Any;)V", false);
         l1 = helper.createLabel();
         mv.visitLabel(l1);
         mv.visitLineNumber(40, l1);

http://git-wip-us.apache.org/repos/asf/cxf/blob/d010a127/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/TypeClassInitializer.java
----------------------------------------------------------------------
diff --git a/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/TypeClassInitializer.java
b/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/TypeClassInitializer.java
index fd19d1e..f5105e7 100644
--- a/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/TypeClassInitializer.java
+++ b/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/TypeClassInitializer.java
@@ -214,7 +214,7 @@ public class TypeClassInitializer extends ServiceModelVisitor {
                 mv.visitVarInsn(Opcodes.ALOAD, 0);
                 mv.visitVarInsn(Opcodes.ALOAD, 1);
                 mv.visitMethodInsn(Opcodes.INVOKESPECIAL, "java/lang/Exception",
-                                   "<init>", "(Ljava/lang/String;)V");
+                                   "<init>", "(Ljava/lang/String;)V", false);
                 mv.visitLabel(createLabel());
                 mv.visitVarInsn(Opcodes.ALOAD, 0);
                 mv.visitVarInsn(Opcodes.ALOAD, 2);

http://git-wip-us.apache.org/repos/asf/cxf/blob/d010a127/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBContextInitializer.java
----------------------------------------------------------------------
diff --git a/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBContextInitializer.java
b/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBContextInitializer.java
index b09eaf4..fd9173a 100644
--- a/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBContextInitializer.java
+++ b/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBContextInitializer.java
@@ -513,7 +513,7 @@ class JAXBContextInitializer extends ServiceModelVisitor {
         mv = cw.visitMethod(Opcodes.ACC_PUBLIC, "<init>", "()V", null, null);
         mv.visitCode();
         mv.visitVarInsn(Opcodes.ALOAD, 0);
-        mv.visitMethodInsn(Opcodes.INVOKESPECIAL, "java/lang/Object", "<init>", "()V");
+        mv.visitMethodInsn(Opcodes.INVOKESPECIAL, "java/lang/Object", "<init>", "()V",
false);
         mv.visitInsn(Opcodes.RETURN);
         mv.visitMaxs(1, 1);
         mv.visitEnd();
@@ -532,7 +532,7 @@ class JAXBContextInitializer extends ServiceModelVisitor {
         }
         paraString.append(")V");
 
-        mv.visitMethodInsn(Opcodes.INVOKESPECIAL, name, "<init>", paraString.toString());
+        mv.visitMethodInsn(Opcodes.INVOKESPECIAL, name, "<init>", paraString.toString(),
false);
 
         mv.visitInsn(Opcodes.ARETURN);
         mv.visitMaxs(1, 1);

http://git-wip-us.apache.org/repos/asf/cxf/blob/d010a127/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/WrapperHelperCompiler.java
----------------------------------------------------------------------
diff --git a/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/WrapperHelperCompiler.java
b/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/WrapperHelperCompiler.java
index 17124c9..c401ee0 100644
--- a/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/WrapperHelperCompiler.java
+++ b/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/WrapperHelperCompiler.java
@@ -187,14 +187,14 @@ final class WrapperHelperCompiler extends ASMHelper {
         mv.visitMethodInsn(Opcodes.INVOKESPECIAL,
                            "java/lang/Object",
                            "<init>",
-                           "()V");
+                           "()V", false);
         if (objectFactoryCls != null) {
             mv.visitVarInsn(Opcodes.ALOAD, 0);
             mv.visitTypeInsn(Opcodes.NEW, periodToSlashes(objectFactoryCls.getName()));
             mv.visitInsn(Opcodes.DUP);
             mv.visitMethodInsn(Opcodes.INVOKESPECIAL,
                                periodToSlashes(objectFactoryCls.getName()),
-                               "<init>", "()V");
+                               "<init>", "()V", false);
             mv.visitFieldInsn(Opcodes.PUTFIELD, periodToSlashes(newClassName),
                               "factory", "L" + periodToSlashes(objectFactoryCls.getName())
+ ";");
         } 
@@ -228,7 +228,7 @@ final class WrapperHelperCompiler extends ASMHelper {
         mv.visitTypeInsn(Opcodes.NEW, periodToSlashes(wrapperType.getName()));
         mv.visitInsn(Opcodes.DUP);
         mv.visitMethodInsn(Opcodes.INVOKESPECIAL, periodToSlashes(wrapperType.getName()),
-                           "<init>", "()V");
+                           "<init>", "()V", false);
         mv.visitVarInsn(Opcodes.ASTORE, 2);
     
         for (int x = 0; x < setMethods.length; x++) {
@@ -255,7 +255,7 @@ final class WrapperHelperCompiler extends ASMHelper {
                 }
                 mv.visitVarInsn(Opcodes.ALOAD, 1);
                 mv.visitIntInsn(Opcodes.SIPUSH, x);
-                mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "java/util/List", "get", "(I)Ljava/lang/Object;");
+                mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "java/util/List", "get", "(I)Ljava/lang/Object;",
true);
                 
                 if (tp.isPrimitive()) {
                     mv.visitTypeInsn(Opcodes.CHECKCAST, NONPRIMITIVE_MAP.get(tp));
@@ -264,10 +264,10 @@ final class WrapperHelperCompiler extends ASMHelper {
                     mv.visitInsn(Opcodes.DUP);
                     mv.visitJumpInsn(Opcodes.IFNULL, l45);
                     mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, NONPRIMITIVE_MAP.get(tp), 
-                                       tp.getName() + "Value", "()" + PRIMITIVE_MAP.get(tp));
+                                       tp.getName() + "Value", "()" + PRIMITIVE_MAP.get(tp),
false);
                     mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL,
                                        periodToSlashes(wrapperType.getName()),
-                                       setMethods[x].getName(), "(" + getClassCode(tp) +
")V");
+                                       setMethods[x].getName(), "(" + getClassCode(tp) +
")V", false);
                     mv.visitJumpInsn(Opcodes.GOTO, l46);
                     mv.visitLabel(l45);
                     mv.visitInsn(Opcodes.POP);
@@ -277,20 +277,20 @@ final class WrapperHelperCompiler extends ASMHelper {
                                      periodToSlashes(jaxbMethods[x].getParameterTypes()[0].getName()));
                     mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, periodToSlashes(objectFactoryClass.getName()),
                                        jaxbMethods[x].getName(),
-                                       getMethodSignature(jaxbMethods[x]));
+                                       getMethodSignature(jaxbMethods[x]), false);
                     mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL,
                                        periodToSlashes(wrapperType.getName()),
-                                       setMethods[x].getName(), "(" + getClassCode(tp) +
")V");
+                                       setMethods[x].getName(), "(" + getClassCode(tp) +
")V", false);
                 } else if (tp.isArray()) { 
                     mv.visitTypeInsn(Opcodes.CHECKCAST, getClassCode(tp));
                     mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL,
                                        periodToSlashes(wrapperType.getName()),
-                                       setMethods[x].getName(), "(" + getClassCode(tp) +
")V");
+                                       setMethods[x].getName(), "(" + getClassCode(tp) +
")V", false);
                 } else {
                     mv.visitTypeInsn(Opcodes.CHECKCAST, periodToSlashes(tp.getName()));
                     mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL,
                                        periodToSlashes(wrapperType.getName()),
-                                       setMethods[x].getName(), "(" + getClassCode(tp) +
")V");
+                                       setMethods[x].getName(), "(" + getClassCode(tp) +
")V", false);
                 }
             }
         }
@@ -325,12 +325,12 @@ final class WrapperHelperCompiler extends ASMHelper {
         mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL,
                            periodToSlashes(wrapperType.getName()),
                            getMethods[x].getName(),
-                           getMethodSignature(getMethods[x]));
+                           getMethodSignature(getMethods[x]), false);
         mv.visitVarInsn(Opcodes.ASTORE, 3);
         mv.visitVarInsn(Opcodes.ALOAD, 1);
         mv.visitIntInsn(Opcodes.SIPUSH, x);
         mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "java/util/List",
-                           "get", "(I)Ljava/lang/Object;");
+                           "get", "(I)Ljava/lang/Object;", true);
         mv.visitTypeInsn(Opcodes.CHECKCAST, "java/util/List");
         mv.visitVarInsn(Opcodes.ASTORE, 4);
         mv.visitVarInsn(Opcodes.ALOAD, 3);
@@ -343,7 +343,7 @@ final class WrapperHelperCompiler extends ASMHelper {
             mv.visitLdcInsn(getMethods[x].getName() + " returned null and there isn't a set
method.");
             mv.visitMethodInsn(Opcodes.INVOKESPECIAL,
                                "java/lang/RuntimeException",
-                               "<init>", "(Ljava/lang/String;)V");
+                               "<init>", "(Ljava/lang/String;)V", false);
             mv.visitInsn(Opcodes.ATHROW);
         } else {
             mv.visitVarInsn(Opcodes.ALOAD, 2);
@@ -353,7 +353,7 @@ final class WrapperHelperCompiler extends ASMHelper {
             mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL,
                                periodToSlashes(wrapperType.getName()),
                                setMethods[x].getName(),
-                               getMethodSignature(setMethods[x]));
+                               getMethodSignature(setMethods[x]), false);
         }
         Label jumpOverLabel = createLabel();
         mv.visitJumpInsn(Opcodes.GOTO, jumpOverLabel);
@@ -365,7 +365,7 @@ final class WrapperHelperCompiler extends ASMHelper {
         mv.visitVarInsn(Opcodes.ALOAD, 3);
         mv.visitVarInsn(Opcodes.ALOAD, 4);
         mv.visitMethodInsn(Opcodes.INVOKEINTERFACE,
-                           "java/util/List", "addAll", "(Ljava/util/Collection;)Z");
+                           "java/util/List", "addAll", "(Ljava/util/Collection;)Z", true);
         mv.visitInsn(Opcodes.POP);
         mv.visitLabel(jumpOverLabel);
         mv.visitLineNumber(107, jumpOverLabel);
@@ -388,7 +388,7 @@ final class WrapperHelperCompiler extends ASMHelper {
         // the ret List
         mv.visitTypeInsn(Opcodes.NEW, "java/util/ArrayList");
         mv.visitInsn(Opcodes.DUP);
-        mv.visitMethodInsn(Opcodes.INVOKESPECIAL, "java/util/ArrayList", "<init>",
"()V");
+        mv.visitMethodInsn(Opcodes.INVOKESPECIAL, "java/util/ArrayList", "<init>",
"()V", false);
         mv.visitVarInsn(Opcodes.ASTORE, 2);
         
         // cast the Object to the wrapperType type
@@ -411,7 +411,7 @@ final class WrapperHelperCompiler extends ASMHelper {
                 mv.visitVarInsn(Opcodes.ALOAD, 2);
                 mv.visitInsn(Opcodes.ACONST_NULL);
                 mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "java/util/List",
-                                   "add", "(Ljava/lang/Object;)Z");
+                                   "add", "(Ljava/lang/Object;)Z", true);
                 mv.visitInsn(Opcodes.POP);
             } else {
                 Label l3 = createLabel();
@@ -423,7 +423,7 @@ final class WrapperHelperCompiler extends ASMHelper {
                 mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, 
                                    periodToSlashes(wrapperClass.getName()), 
                                    method.getName(), 
-                                   getMethodSignature(method));
+                                   getMethodSignature(method), false);
                 if (method.getReturnType().isPrimitive()) {
                     // wrap into Object type
                     createObjectWrapper(mv, method.getReturnType());
@@ -435,11 +435,11 @@ final class WrapperHelperCompiler extends ASMHelper {
 
                     mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL,
                                        "javax/xml/bind/JAXBElement",
-                                       "getValue", "()Ljava/lang/Object;");
+                                       "getValue", "()Ljava/lang/Object;", false);
                     mv.visitLabel(jumpOverLabel);
                 }
                 
-                mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "java/util/List", "add", "(Ljava/lang/Object;)Z");
+                mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "java/util/List", "add", "(Ljava/lang/Object;)Z",
true);
                 mv.visitInsn(Opcodes.POP);
             }
         }
@@ -471,6 +471,6 @@ final class WrapperHelperCompiler extends ASMHelper {
     private static void createObjectWrapper(MethodVisitor mv, Class<?> cl) {
         mv.visitMethodInsn(Opcodes.INVOKESTATIC, NONPRIMITIVE_MAP.get(cl),
                            "valueOf", "(" + PRIMITIVE_MAP.get(cl) + ")L" 
-                           + NONPRIMITIVE_MAP.get(cl) + ";");
+                           + NONPRIMITIVE_MAP.get(cl) + ";", false);
     }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/d010a127/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
index 225625c..bc2e6e3 100644
--- a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
+++ b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
@@ -212,7 +212,7 @@ public final class WrapperClassGenerator extends ASMHelper {
         Label lbegin = createLabel();
         mv.visitLabel(lbegin);
         mv.visitVarInsn(Opcodes.ALOAD, 0);
-        mv.visitMethodInsn(Opcodes.INVOKESPECIAL, "java/lang/Object", "<init>", "()V");
+        mv.visitMethodInsn(Opcodes.INVOKESPECIAL, "java/lang/Object", "<init>", "()V",
false);
         mv.visitInsn(Opcodes.RETURN);
         Label lend = createLabel();
         mv.visitLabel(lend);


Mime
View raw message