You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2013/09/03 18:25:27 UTC

svn commit: r1519747 - /cxf/trunk/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContextResourceResolver.java

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));
             }