cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-6502] Avoiding IndexOutOfBoundsException if ContentType is empty
Date Fri, 17 Jul 2015 13:42:20 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes b1ee19bcf -> aac5ae771


[CXF-6502] Avoiding IndexOutOfBoundsException if ContentType is empty


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/aac5ae77
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/aac5ae77
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/aac5ae77

Branch: refs/heads/3.0.x-fixes
Commit: aac5ae7715fddacc1a9da2fb476a129d56ee4ed0
Parents: b1ee19b
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Fri Jul 17 16:41:10 2015 +0300
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Fri Jul 17 16:42:03 2015 +0300

----------------------------------------------------------------------
 .../java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/aac5ae77/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
index e32f05c..2154cd3 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
@@ -118,7 +118,7 @@ public class JAXRSInInterceptor extends AbstractPhaseInterceptor<Message>
{
         // Content-Type
         String requestContentType = null;
         List<String> ctHeaderValues = protocolHeaders.get(Message.CONTENT_TYPE);
-        if (ctHeaderValues != null) {
+        if (ctHeaderValues != null && !ctHeaderValues.isEmpty()) {
             requestContentType = ctHeaderValues.get(0);
             message.put(Message.CONTENT_TYPE, requestContentType);
         }


Mime
View raw message