cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1087945 - /cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
Date Sat, 02 Apr 2011 00:46:42 GMT
Author: dkulp
Date: Sat Apr  2 00:46:42 2011
New Revision: 1087945

URL: http://svn.apache.org/viewvc?rev=1087945&view=rev
Log:
[CXF-3413] If the number of elements in the body exceeds what the soap
message expects, throw a proper fault and not an
IndexOutOfBoundsException.

Modified:
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java?rev=1087945&r1=1087944&r2=1087945&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
(original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
Sat Apr  2 00:46:42 2011
@@ -184,8 +184,11 @@ public class DocLiteralInInterceptor ext
                     
                     if (msgInfo != null && msgInfo.getMessageParts() != null 
                         && msgInfo.getMessageParts().size() > 0) {
-                        assert msgInfo.getMessageParts().size() > paramNum;
-                        p = msgInfo.getMessageParts().get(paramNum);
+                        if (msgInfo.getMessageParts().size() > paramNum) {
+                            p = msgInfo.getMessageParts().get(paramNum);
+                        } else {
+                            p = null;
+                        }
                     } else {
                         p = findMessagePart(exchange, operations, elName, client, paramNum,
message);
                     }



Mime
View raw message