You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by st...@apache.org on 2011/03/10 21:46:42 UTC

svn commit: r1080342 - /myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/application/DefaultViewHandlerSupport.java

Author: struberg
Date: Thu Mar 10 20:46:42 2011
New Revision: 1080342

URL: http://svn.apache.org/viewvc?rev=1080342&view=rev
Log:
MYFACES-3065 only disable resource caching evaluation in ProjectStage#Development

Modified:
    myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/application/DefaultViewHandlerSupport.java

Modified: myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/application/DefaultViewHandlerSupport.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/application/DefaultViewHandlerSupport.java?rev=1080342&r1=1080341&r2=1080342&view=diff
==============================================================================
--- myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/application/DefaultViewHandlerSupport.java (original)
+++ myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/application/DefaultViewHandlerSupport.java Thu Mar 10 20:46:42 2011
@@ -484,16 +484,18 @@ public class DefaultViewHandlerSupport i
     {
         if (_checkedViewIdCacheEnabled == null)
         {
-            //first, check to make sure that ProjectStage is production, if not, skip caching
-            if (!context.isProjectStage(ProjectStage.Production))
+            // first, check if the ProjectStage is development and skip caching in this case
+            if (context.isProjectStage(ProjectStage.Development))
             {
-                return _checkedViewIdCacheEnabled = Boolean.FALSE;
+                _checkedViewIdCacheEnabled = Boolean.FALSE;
+            }
+            else
+            {
+                // in all ohter cases, make sure that the cache is not explicitly disabled via context param
+                _checkedViewIdCacheEnabled = WebConfigParamUtils.getBooleanInitParameter(context.getExternalContext(),
+                        CHECKED_VIEWID_CACHE_ENABLED_ATTRIBUTE,
+                        CHECKED_VIEWID_CACHE_ENABLED_DEFAULT);
             }
-
-            //if in production, make sure that the cache is not explicitly disabled via context param
-            _checkedViewIdCacheEnabled = WebConfigParamUtils.getBooleanInitParameter(context.getExternalContext(), 
-                    CHECKED_VIEWID_CACHE_ENABLED_ATTRIBUTE,
-                    CHECKED_VIEWID_CACHE_ENABLED_DEFAULT);
 
             if (log.isLoggable(Level.FINE))
             {