openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1830457 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java
Date Sat, 28 Apr 2018 15:38:51 GMT
Author: struberg
Date: Sat Apr 28 15:38:50 2018
New Revision: 1830457

URL: http://svn.apache.org/viewvc?rev=1830457&view=rev
Log:
OWB-1243 use LinkedList instead of java.util.Stack

LinkedList provides the same semantica but is way faster
for small stacks. Which is the predominant form we have in OWB

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

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java?rev=1830457&r1=1830456&r2=1830457&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java
Sat Apr 28 15:38:50 2018
@@ -33,6 +33,7 @@ import java.io.ObjectOutputStream;
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Iterator;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.Stack;
 
@@ -50,7 +51,7 @@ public class CreationalContextImpl<T> im
     /**
      * The injection point objects to be injected into injection points of type InjectionPoint
      */
-    private transient Stack<InjectionPoint> injectionPoints;
+    private transient LinkedList<InjectionPoint> injectionPoints;
     
     /**
      * The EventMetadata objects to be injected into injection points of type EventMetadata
@@ -128,7 +129,7 @@ public class CreationalContextImpl<T> im
     {
         if (injectionPoints == null)
         {
-            injectionPoints = new Stack<>();
+            injectionPoints = new LinkedList<>();
         }
         injectionPoints.push(injectionPoint);
     }



Mime
View raw message