myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From embre...@apache.org
Subject svn commit: r1823978 - /myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
Date Mon, 12 Feb 2018 14:46:17 GMT
Author: embreijo
Date: Mon Feb 12 14:46:16 2018
New Revision: 1823978

URL: http://svn.apache.org/viewvc?rev=1823978&view=rev
Log:
MYFACES-4197 Injected bean storage list is created on every request in development mode

Modified:
    myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java

Modified: myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java?rev=1823978&r1=1823977&r2=1823978&view=diff
==============================================================================
--- myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
(original)
+++ myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
Mon Feb 12 14:46:16 2018
@@ -230,7 +230,13 @@ public class FacesConfigurator
         }
         _externalContext = externalContext;
 
-        _externalContext.getApplicationMap().put(INJECTED_BEAN_STORAGE_KEY, new CopyOnWriteArrayList());
+        // In dev mode a new Faces Configurator is created for every request so only
+        // create a new bean storage list if we don't already have one which will be
+        // the case first time through during init.
+        if (_externalContext.getApplicationMap().get(INJECTED_BEAN_STORAGE_KEY) == null)

+        {
+            _externalContext.getApplicationMap().put(INJECTED_BEAN_STORAGE_KEY, new CopyOnWriteArrayList());
+        }
     }
 
     /**



Mime
View raw message