openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1080678 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContext.java
Date Fri, 11 Mar 2011 17:18:32 GMT
Author: struberg
Date: Fri Mar 11 17:18:32 2011
New Revision: 1080678

URL: http://svn.apache.org/viewvc?rev=1080678&view=rev
Log:
OWB-461 remove redundant Map#get from a hotspot

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=1080678&r1=1080677&r2=1080678&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 11 17:18:32 2011
@@ -41,7 +41,6 @@ import org.apache.webbeans.container.Ser
 import org.apache.webbeans.container.SerializableBeanVault;
 import org.apache.webbeans.context.creational.BeanInstanceBag;
 import org.apache.webbeans.context.type.ContextTypes;
-import org.apache.webbeans.util.Asserts;
 
 /**
  * Abstract implementation of the {@link WebBeansContext} interfaces.
@@ -236,10 +235,10 @@ public abstract class AbstractContext im
     @SuppressWarnings("unchecked")
     public <T> CreationalContext<T> getCreationalContext(Contextual<T>
contextual)
     {
-        Asserts.assertNotNull(contextual);
-        if(this.componentInstanceMap.containsKey(contextual))
+        BeanInstanceBag<?> bag = componentInstanceMap.get(contextual);
+        if (bag != null)
         {
-            return (CreationalContext<T>)this.componentInstanceMap.get(contextual).getBeanCreationalContext();
+            return (CreationalContext<T>) bag.getBeanCreationalContext();
         }
         
         return null;



Mime
View raw message