Author: dkulp
Date: Thu May 22 09:02:15 2008
New Revision: 659141
URL: http://svn.apache.org/viewvc?rev=659141&view=rev
Log:
[CXF-1604] Fix NPE issues with null Lists being sent as wrapped doc/lit params
Modified:
cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperHelperCompiler.java
cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java
Modified:
cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperHelperCompiler.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperHelperCompiler.java?rev=659141&r1=659140&r2=659141&view=diff
==============================================================================
---
cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperHelperCompiler.java
(original)
+++
cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperHelperCompiler.java
Thu May 22 09:02:15 2008
@@ -301,7 +301,7 @@
// List newA = (List)lst.get(99);
// if (aVal == null) {
// obj.setA(newA);
- // } else {
+ // } else if (newA != null) {
// aVal.addAll(newA);
// }
@@ -341,6 +341,8 @@
Label jumpOverLabel = new Label();
mv.visitJumpInsn(Opcodes.GOTO, jumpOverLabel);
mv.visitLabel(nonNullLabel);
+ mv.visitVarInsn(Opcodes.ALOAD, 4);
+ mv.visitJumpInsn(Opcodes.IFNULL, jumpOverLabel);
mv.visitVarInsn(Opcodes.ALOAD, 3);
mv.visitVarInsn(Opcodes.ALOAD, 4);
mv.visitMethodInsn(Opcodes.INVOKEINTERFACE,
Modified:
cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java?rev=659141&r1=659140&r2=659141&view=diff
==============================================================================
---
cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java
(original)
+++
cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java
Thu May 22 09:02:15 2008
@@ -2074,6 +2074,9 @@
assertTrue("testStringList(): Incorrect value for out param",
yOrig.equals(z.value));
assertTrue("testStringList(): Incorrect return value",
x.equals(ret));
}
+ if (testDocLiteral) {
+ ret = docClient.testStringList(null, y, z);
+ }
} else {
String[] x = {"I", "am", "SimpleList"};
String[] yOrig = {"Does", "SimpleList", "Work"};