cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1519747 - /cxf/trunk/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContextResourceResolver.java
Date Tue, 03 Sep 2013 16:25:27 GMT
Author: dkulp
Date: Tue Sep  3 16:25:26 2013
New Revision: 1519747

URL: http://svn.apache.org/r1519747
Log:
Don't use the 3.0 only API if the 2.5.x version will work

Modified:
    cxf/trunk/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContextResourceResolver.java

Modified: cxf/trunk/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContextResourceResolver.java
URL: http://svn.apache.org/viewvc/cxf/trunk/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContextResourceResolver.java?rev=1519747&r1=1519746&r2=1519747&view=diff
==============================================================================
--- cxf/trunk/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContextResourceResolver.java
(original)
+++ cxf/trunk/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContextResourceResolver.java
Tue Sep  3 16:25:26 2013
@@ -69,7 +69,10 @@ public class BusApplicationContextResour
         try {
             T resource = null;
             if (resourceName == null) {
-                resource = resourceType.cast(context.getBean(resourceType));
+                String names[] = context.getBeanNamesForType(resourceType);
+                if (names != null && names.length > 0) {
+                    resource = resourceType.cast(context.getBean(names[0], resourceType));
+                }
             } else {
                 resource = resourceType.cast(context.getBean(resourceName, resourceType));
             }



Mime
View raw message