myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From embre...@apache.org
Subject svn commit: r1823980 - /myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
Date Mon, 12 Feb 2018 14:51:46 GMT
Author: embreijo
Date: Mon Feb 12 14:51:45 2018
New Revision: 1823980

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

Modified:
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java?rev=1823980&r1=1823979&r2=1823980&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
(original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
Mon Feb 12 14:51:45 2018
@@ -225,7 +225,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