openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1304671 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContext.java
Date Fri, 23 Mar 2012 23:59:16 GMT
Author: struberg
Date: Fri Mar 23 23:59:16 2012
New Revision: 1304671

URL: http://svn.apache.org/viewvc?rev=1304671&view=rev
Log:
performance tuning, do hashmap access only once

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContext.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContext.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContext.java?rev=1304671&r1=1304670&r2=1304671&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContext.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContext.java
Fri Mar 23 23:59:16 2012
@@ -171,10 +171,12 @@ public abstract class AbstractContext im
     public <T> T get(Contextual<T> component)
     {
         checkActive();
+
+        BeanInstanceBag bag = componentInstanceMap.get(component);
         
-        if(componentInstanceMap.get(component) != null)
+        if(bag != null)
         {
-            return (T) componentInstanceMap.get(component).getBeanInstance();    
+            return (T) bag.getBeanInstance();
         }
         
         return null;



Mime
View raw message