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 2009/10/19 23:06:41 UTC
svn commit: r826811 -
/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java
Author: dkulp
Date: Mon Oct 19 21:06:40 2009
New Revision: 826811
URL: http://svn.apache.org/viewvc?rev=826811&view=rev
Log:
[CXF-2478] Fix problem of wrong part being removed
Modified:
cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java
Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java?rev=826811&r1=826810&r2=826811&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java Mon Oct 19 21:06:40 2009
@@ -148,7 +148,7 @@
if (removes == null) {
removes = new ArrayList<Integer>();
}
- removes.add(mpi.getIndex());
+ removes.add(part.getIndex());
}
} else {
++count;
@@ -159,7 +159,9 @@
} else if (removes != null) {
Collections.sort(removes, Collections.reverseOrder());
for (Integer i : removes) {
- newParams.remove(i.intValue());
+ if (i < newParams.size()) {
+ newParams.remove(i.intValue());
+ }
}
}
@@ -187,13 +189,15 @@
for (MessagePartInfo p : messageInfo.getMessageParts()) {
if (Boolean.TRUE.equals(p.getProperty(ReflectionServiceFactoryBean.HEADER))) {
- int idx = p.getIndex();
- ensureSize(elTypeNames, idx);
- ensureSize(partClasses, idx);
- ensureSize(partNames, idx);
- elTypeNames.set(idx, null);
- partClasses.set(idx, null);
- partNames.set(idx, null);
+ if (p.getTypeClass() != null) {
+ int idx = p.getIndex();
+ ensureSize(elTypeNames, idx);
+ ensureSize(partClasses, idx);
+ ensureSize(partNames, idx);
+ elTypeNames.set(idx, null);
+ partClasses.set(idx, null);
+ partNames.set(idx, null);
+ }
} else {
String elementType = null;
if (p.getTypeQName() == null) {