myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r1522447 - in /myfaces/core/trunk: impl/src/main/java/org/apache/myfaces/application/ResourceHandlerImpl.java shared/src/main/java/org/apache/myfaces/shared/resource/ResourceHandlerCache.java
Date Thu, 12 Sep 2013 05:24:47 GMT
Author: lu4242
Date: Thu Sep 12 05:24:46 2013
New Revision: 1522447

URL: http://svn.apache.org/r1522447
Log:
small fix on ResourceHandlerCache for view resources

Modified:
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ResourceHandlerImpl.java
    myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/resource/ResourceHandlerCache.java

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ResourceHandlerImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ResourceHandlerImpl.java?rev=1522447&r1=1522446&r2=1522447&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ResourceHandlerImpl.java
(original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ResourceHandlerImpl.java
Thu Sep 12 05:24:46 2013
@@ -1586,7 +1586,7 @@ public class ResourceHandlerImpl extends
     }
 
     @Override
-    public Resource createViewResource(FacesContext context, String resourceName)
+    public Resource createViewResource(FacesContext facesContext, String resourceName)
     {
         // There are some special points to remember for a view resource in comparison
         // with a normal resource:
@@ -1629,7 +1629,6 @@ public class ResourceHandlerImpl extends
         {
             return null;
         }
-        FacesContext facesContext = FacesContext.getCurrentInstance();
         final String localePrefix = getLocalePrefixForLocateResource(facesContext);
         String contentType = facesContext.getExternalContext().getMimeType(resourceName);
         final List<String> contracts = facesContext.getResourceLibraryContracts();


Modified: myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/resource/ResourceHandlerCache.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/resource/ResourceHandlerCache.java?rev=1522447&r1=1522446&r2=1522447&view=diff
==============================================================================
--- myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/resource/ResourceHandlerCache.java
(original)
+++ myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/resource/ResourceHandlerCache.java
Thu Sep 12 05:24:46 2013
@@ -239,7 +239,7 @@ public class ResourceHandlerCache
             return false;
         }
 
-        ResourceKey key = new ResourceKey(resourceName, null, contentType, localePrefix);
+        ResourceKey key = new ResourceKey(resourceName, null, contentType, localePrefix,
contractName);
         return _viewResourceCacheMap.get(key) != null;
     }
     
@@ -299,7 +299,7 @@ public class ResourceHandlerCache
                     (maxSize * 4 + 3) / 3, maxSize);
         }
 
-        _viewResourceCacheMap.put(new ResourceKey(resourceName,
+        _viewResourceCacheMap.put(new ResourceKey(resourceName, null,
                 contentType, localePrefix, contractName), new ResourceValue(resource, loader));
     }
 



Mime
View raw message