You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2010/03/17 18:54:27 UTC
svn commit: r924387 - in /cxf/branches/2.2.x-fixes: ./
rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/WrapperHelperCompiler.java
Author: dkulp
Date: Wed Mar 17 17:54:27 2010
New Revision: 924387
URL: http://svn.apache.org/viewvc?rev=924387&view=rev
Log:
Merged revisions 924386 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r924386 | dkulp | 2010-03-17 13:51:59 -0400 (Wed, 17 Mar 2010) | 2 lines
[CXF-2719] Fix problems with inOccurs=0/nillable wrapper elements
if the element isn't on the wire
........
Modified:
cxf/branches/2.2.x-fixes/ (props changed)
cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/WrapperHelperCompiler.java
Propchange: cxf/branches/2.2.x-fixes/
('svn:mergeinfo' removed)
Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/WrapperHelperCompiler.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/WrapperHelperCompiler.java?rev=924387&r1=924386&r2=924387&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/WrapperHelperCompiler.java (original)
+++ cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/WrapperHelperCompiler.java Wed Mar 17 17:54:27 2010
@@ -424,9 +424,14 @@ final class WrapperHelperCompiler extend
createObjectWrapper(mv, method.getReturnType());
}
if (JAXBElement.class.isAssignableFrom(method.getReturnType())) {
+ Label jumpOverLabel = new Label();
+ mv.visitInsn(Opcodes.DUP);
+ mv.visitJumpInsn(Opcodes.IFNULL, jumpOverLabel);
+
mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL,
"javax/xml/bind/JAXBElement",
"getValue", "()Ljava/lang/Object;");
+ mv.visitLabel(jumpOverLabel);
}
mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "java/util/List", "add", "(Ljava/lang/Object;)Z");
@@ -463,11 +468,4 @@ final class WrapperHelperCompiler extend
"valueOf", "(" + PRIMITIVE_MAP.get(cl) + ")L"
+ NONPRIMITIVE_MAP.get(cl) + ";");
}
-
-
-
-
-
-
-
}