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:44:31 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes f3e3b7c63 -> e196f40b3


[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/e196f40b
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/e196f40b
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/e196f40b

Branch: refs/heads/2.7.x-fixes
Commit: e196f40b36e5159fa8177d429ab1afed9a782801
Parents: f3e3b7c
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:44:13 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/e196f40b/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 f1ba2ce..244bd82 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
@@ -127,7 +127,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