Repository: cxf
Updated Branches:
refs/heads/2.6.x-fixes af090cbd4 -> 34239a8a7
[CXF-5673] Update to support latest ASM/XBean code
Patch from Romain Manni-Bucau applied with updates
Conflicts:
api/src/main/java/org/apache/cxf/common/jaxb/JAXBUtils.java
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/e746c090
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/e746c090
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/e746c090
Branch: refs/heads/2.6.x-fixes
Commit: e746c09040bf08f652ded38a4f748d4c53423418
Parents: af090cb
Author: Daniel Kulp <[email protected]>
Authored: Sat Apr 5 20:27:52 2014 -0400
Committer: Daniel Kulp <[email protected]>
Committed: Sat Apr 5 21:57:47 2014 -0400
----------------------------------------------------------------------
.../org/apache/cxf/common/jaxb/JAXBUtils.java | 4 +-
.../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, 83 insertions(+), 40 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/e746c090/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 c4a32c9..1f0fed3 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
@@ -1069,7 +1069,7 @@ public final class JAXBUtils {
mv.visitLineNumber(30, l0);
mv.visitVarInsn(Opcodes.ALOAD, 0);
mv.visitMethodInsn(Opcodes.INVOKESPECIAL,
-
"com/sun/xml/internal/bind/marshaller/NamespacePrefixMapper", "<init>", "()V");
+
"com/sun/xml/internal/bind/marshaller/NamespacePrefixMapper", "<init>", "()V",
false);
Label l1 = helper.createLabel();
mv.visitLabel(l1);
mv.visitLineNumber(31, l1);
@@ -1103,7 +1103,7 @@ public final class JAXBUtils {
"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/e746c090/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 be1120d..11baf18 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;
@@ -84,6 +85,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");
@@ -443,7 +445,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 visitFieldInsn(int getfield, String periodToSlashes,
String string, String string2);
http://git-wip-us.apache.org/repos/asf/cxf/blob/e746c090/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 638c5c9..676e4f3 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;
@@ -117,11 +153,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/e746c090/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/e746c090/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/e746c090/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 f3dc100..8db4c35 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
@@ -496,7 +496,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();
@@ -515,7 +515,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/e746c090/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 24e689a..59951dc 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
@@ -190,14 +190,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()) + ";");
}
@@ -231,7 +231,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++) {
@@ -258,7 +258,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));
@@ -267,10 +267,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);
@@ -280,20 +280,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);
}
}
}
@@ -328,12 +328,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);
@@ -346,7 +346,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);
@@ -356,7 +356,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);
@@ -368,7 +368,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);
@@ -391,7 +391,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
@@ -414,7 +414,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();
@@ -426,7 +426,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());
@@ -438,11 +438,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);
}
}
@@ -474,6 +474,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/e746c090/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);