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:41:33 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 90c777969 -> b52efaeba


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

Branch: refs/heads/master
Commit: b52efaebaadce25cebc0797dbf100fc4476b63db
Parents: 90c7779
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:41:10 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/b52efaeb/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 5c3e389..e685d30 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