cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1422015 - /cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/CXFBusImpl.java
Date Fri, 14 Dec 2012 18:10:39 GMT
Author: dkulp
Date: Fri Dec 14 18:10:38 2012
New Revision: 1422015

URL: http://svn.apache.org/viewvc?rev=1422015&view=rev
Log:
Merged revisions 1422005 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/branches/2.6.x-fixes

........
  r1422005 | dkulp | 2012-12-14 12:55:34 -0500 (Fri, 14 Dec 2012) | 10 lines

  Merged revisions 1421946 via  git cherry-pick from
  https://svn.apache.org/repos/asf/cxf/trunk

  ........
    r1421946 | dkulp | 2012-12-14 10:51:07 -0500 (Fri, 14 Dec 2012) | 2 lines

    [CXF-4703] Slight optimization

  ........

........

Modified:
    cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/CXFBusImpl.java

Modified: cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/CXFBusImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/CXFBusImpl.java?rev=1422015&r1=1422014&r2=1422015&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/CXFBusImpl.java (original)
+++ cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/CXFBusImpl.java Fri
Dec 14 18:10:38 2012
@@ -94,7 +94,11 @@ public class CXFBusImpl extends Abstract
 
     public final <T> T getExtension(Class<T> extensionType) {
         Object obj = extensions.get(extensionType);
-        if (obj == null && !missingExtensions.contains(extensionType)) {
+        if (obj == null) {
+            if (missingExtensions.contains(extensionType)) {
+                //already know we cannot find it
+                return null;
+            }
             ConfiguredBeanLocator loc = (ConfiguredBeanLocator)extensions.get(ConfiguredBeanLocator.class);
             if (loc == null) {
                 loc = createConfiguredBeanLocator();
@@ -113,6 +117,7 @@ public class CXFBusImpl extends Abstract
         if (null != obj) {
             return extensionType.cast(obj);
         } else {
+            //record that it couldn't be found to avoid expensive searches again in the future
             missingExtensions.add(extensionType);
         }
         return null;



Mime
View raw message