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 06EA310705 for ; Tue, 3 Sep 2013 16:49:36 +0000 (UTC) Received: (qmail 2592 invoked by uid 500); 3 Sep 2013 16:49:35 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 2473 invoked by uid 500); 3 Sep 2013 16:49:35 -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 2462 invoked by uid 99); 3 Sep 2013 16:49:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Sep 2013 16:49:34 +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; Tue, 03 Sep 2013 16:49:33 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 2EFAC23889EC; Tue, 3 Sep 2013 16:49:12 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1519753 - /cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContextResourceResolver.java Date: Tue, 03 Sep 2013 16:49:12 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20130903164912.2EFAC23889EC@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dkulp Date: Tue Sep 3 16:49:11 2013 New Revision: 1519753 URL: http://svn.apache.org/r1519753 Log: Merged revisions 1519750 via git cherry-pick from https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes ........ r1519750 | dkulp | 2013-09-03 12:33:05 -0400 (Tue, 03 Sep 2013) | 10 lines Merged revisions 1519747 via git cherry-pick from https://svn.apache.org/repos/asf/cxf/trunk ........ r1519747 | dkulp | 2013-09-03 12:25:26 -0400 (Tue, 03 Sep 2013) | 2 lines Don't use the 3.0 only API if the 2.5.x version will work ........ ........ Modified: cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContextResourceResolver.java Modified: cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContextResourceResolver.java URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContextResourceResolver.java?rev=1519753&r1=1519752&r2=1519753&view=diff ============================================================================== --- cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContextResourceResolver.java (original) +++ cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContextResourceResolver.java Tue Sep 3 16:49:11 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)); }