openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1830468 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java
Date Sat, 28 Apr 2018 18:50:53 GMT
Author: struberg
Date: Sat Apr 28 18:50:53 2018
New Revision: 1830468

URL: http://svn.apache.org/viewvc?rev=1830468&view=rev
Log:
OWB-1243 no need to filter for async for Lifecycle events

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java?rev=1830468&r1=1830467&r2=1830468&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java
Sat Apr 28 18:50:53 2018
@@ -676,14 +676,18 @@ public final class NotificationManager
 
         LinkedList<ObserverMethod<? super Object>> observerMethods = new LinkedList<>(resolveObservers(event,
metadata, isLifecycleEvent));
 
-        // filter for all async or all synchronous observermethods
-        // oldschool and not Streams, because of performance and avoiding tons of temporary
objects
-        Iterator<ObserverMethod<? super Object>> observerMethodIterator = observerMethods.iterator();
-        while (observerMethodIterator.hasNext())
+        // async doesn't apply to Extension lifecycle events
+        if (!isLifecycleEvent)
         {
-            if (async != observerMethodIterator.next().isAsync())
+            // filter for all async or all synchronous observermethods
+            // oldschool and not Streams, because of performance and avoiding tons of temporary
objects
+            Iterator<ObserverMethod<? super Object>> observerMethodIterator =
observerMethods.iterator();
+            while (observerMethodIterator.hasNext())
             {
-                observerMethodIterator.remove();
+                if (async != observerMethodIterator.next().isAsync())
+                {
+                    observerMethodIterator.remove();
+                }
             }
         }
 



Mime
View raw message