cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
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 GMT
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<String, String> 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);
             }
         }



Mime
View raw message