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 1AD8F7A29 for ; Wed, 28 Sep 2011 13:03:11 +0000 (UTC) Received: (qmail 45047 invoked by uid 500); 28 Sep 2011 13:03:11 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 44988 invoked by uid 500); 28 Sep 2011 13:03:11 -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 44981 invoked by uid 99); 28 Sep 2011 13:03:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Sep 2011 13:03:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Sep 2011 13:03:08 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 765572388900 for ; Wed, 28 Sep 2011 13:02:47 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1176859 - in /cxf/branches/2.4.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java Date: Wed, 28 Sep 2011 13:02:47 -0000 To: commits@cxf.apache.org From: sergeyb@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20110928130247.765572388900@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sergeyb Date: Wed Sep 28 13:02:47 2011 New Revision: 1176859 URL: http://svn.apache.org/viewvc?rev=1176859&view=rev Log: Merged revisions 1176856 via svnmerge from https://svn.apache.org/repos/asf/cxf/trunk ........ r1176856 | sergeyb | 2011-09-28 13:59:59 +0100 (Wed, 28 Sep 2011) | 1 line [CXF-2313] Minor update to the servlet ........ Modified: cxf/branches/2.4.x-fixes/ (props changed) cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java Propchange: cxf/branches/2.4.x-fixes/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Sep 28 13:02:47 2011 @@ -1 +1 @@ -/cxf/trunk:1176840 +/cxf/trunk:1176840,1176856 Propchange: cxf/branches/2.4.x-fixes/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java?rev=1176859&r1=1176858&r2=1176859&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java (original) +++ cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java Wed Sep 28 13:02:47 2011 @@ -245,7 +245,7 @@ public class CXFNonSpringJaxrsServlet ex private String getClassNameAndProperties(String cName, Map props) { String theName = cName.trim(); - int ind = theName.lastIndexOf("("); + int ind = theName.indexOf("("); if (ind != -1 && theName.endsWith(")")) { props.putAll(CastUtils.cast(handleMapSequence(theName.substring(ind + 1, theName.length() - 1)), String.class, String.class)); @@ -323,7 +323,12 @@ public class CXFNonSpringJaxrsServlet ex + entry.getKey().substring(1)); if (m != null) { Class type = m.getParameterTypes()[0]; - Object value = PrimitiveUtils.read(entry.getValue(), type); + Object value = entry.getValue(); + if (InjectionUtils.isPrimitive(type)) { + value = PrimitiveUtils.read(entry.getValue(), type); + } else if (List.class.isAssignableFrom(type)) { + value = Collections.singletonList(value); + } InjectionUtils.injectThroughMethod(instance, m, value); } }