myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tandrasc...@apache.org
Subject [myfaces] branch master updated: better initial size
Date Sun, 14 Apr 2019 16:10:22 GMT
This is an automated email from the ASF dual-hosted git repository.

tandraschko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces.git


The following commit(s) were added to refs/heads/master by this push:
     new 8344bd2  better initial size
8344bd2 is described below

commit 8344bd23e62a074b87ffe8746481c742fa587962
Author: Thomas Andraschko <tandraschko@apache.org>
AuthorDate: Sun Apr 14 18:10:13 2019 +0200

    better initial size
---
 .../java/org/apache/myfaces/lifecycle/PhaseListenerManager.java   | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/impl/src/main/java/org/apache/myfaces/lifecycle/PhaseListenerManager.java b/impl/src/main/java/org/apache/myfaces/lifecycle/PhaseListenerManager.java
index 899a652..3871e18 100644
--- a/impl/src/main/java/org/apache/myfaces/lifecycle/PhaseListenerManager.java
+++ b/impl/src/main/java/org/apache/myfaces/lifecycle/PhaseListenerManager.java
@@ -44,15 +44,17 @@ class PhaseListenerManager
     // Tracks success in the beforePhase. Listeners that throw an exception
     // in beforePhase or were never called because a previous listener threw
     // an exception should not have its afterPhase called
-    private Map<PhaseId, boolean[]> listenerSuccessMap = new HashMap<PhaseId, boolean[]>();
+    private Map<PhaseId, boolean[]> listenerSuccessMap;
 
     PhaseListenerManager(Lifecycle lifecycle, FacesContext facesContext, PhaseListener[]
phaseListeners)
     {
         this.lifecycle = lifecycle;
         this.facesContext = facesContext;
         this.phaseListeners = phaseListeners;
+        this.listenerSuccessMap = new HashMap<>(PhaseId.VALUES.size());
+       
     }
-
+ 
     private boolean isListenerForThisPhase(PhaseListener phaseListener, PhaseId phaseId)
     {
         int listenerPhaseId = phaseListener.getPhaseId().getOrdinal();
@@ -126,7 +128,7 @@ class PhaseListenerManager
 
     }
     
-    private void publishException (Throwable e, PhaseId phaseId, String key)
+    private void publishException(Throwable e, PhaseId phaseId, String key)
     {
         ExceptionQueuedEventContext context = new ExceptionQueuedEventContext(facesContext,
e, null, phaseId);
         


Mime
View raw message