Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 88908182C9 for ; Fri, 17 Jul 2015 13:42:20 +0000 (UTC) Received: (qmail 45871 invoked by uid 500); 17 Jul 2015 13:42:20 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 45802 invoked by uid 500); 17 Jul 2015 13:42:20 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 45793 invoked by uid 99); 17 Jul 2015 13:42:20 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jul 2015 13:42:20 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 533CDE0120; Fri, 17 Jul 2015 13:42:20 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sergeyb@apache.org To: commits@cxf.apache.org Message-Id: <4f7a2892ff3646fa9c19a9eac788ac2f@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: cxf git commit: [CXF-6502] Avoiding IndexOutOfBoundsException if ContentType is empty Date: Fri, 17 Jul 2015 13:42:20 +0000 (UTC) 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 Authored: Fri Jul 17 16:41:10 2015 +0300 Committer: Sergey Beryozkin 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 { // Content-Type String requestContentType = null; List ctHeaderValues = protocolHeaders.get(Message.CONTENT_TYPE); - if (ctHeaderValues != null) { + if (ctHeaderValues != null && !ctHeaderValues.isEmpty()) { requestContentType = ctHeaderValues.get(0); message.put(Message.CONTENT_TYPE, requestContentType); }