myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r1657997 - in /myfaces/core/trunk/impl/src: main/java/org/apache/myfaces/application/ResourceHandlerImpl.java test/java/org/apache/myfaces/application/contracts/ContractsCreateResourceMyFacesRequestTestCase.java
Date Fri, 06 Feb 2015 23:58:20 GMT
Author: lu4242
Date: Fri Feb  6 23:58:20 2015
New Revision: 1657997

URL: http://svn.apache.org/r1657997
Log:
MYFACES-3956 ResourceHandler.libraryExists(...) does not work for resource library contracts

Modified:
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ResourceHandlerImpl.java
    myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/contracts/ContractsCreateResourceMyFacesRequestTestCase.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=1657997&r1=1657996&r2=1657997&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
Fri Feb  6 23:58:20 2015
@@ -843,7 +843,7 @@ public class ResourceHandlerImpl extends
                 for (ContractResourceLoader loader : getResourceHandlerSupport()
                         .getContractResourceLoaders())
                 {
-                    if (loader.libraryExists(contract, libraryName))
+                    if (loader.libraryExists(libraryName, contract))
                     {
                         return true;
                     }

Modified: myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/contracts/ContractsCreateResourceMyFacesRequestTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/contracts/ContractsCreateResourceMyFacesRequestTestCase.java?rev=1657997&r1=1657996&r2=1657997&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/contracts/ContractsCreateResourceMyFacesRequestTestCase.java
(original)
+++ myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/contracts/ContractsCreateResourceMyFacesRequestTestCase.java
Fri Feb  6 23:58:20 2015
@@ -25,11 +25,11 @@ import javax.faces.application.ResourceH
 import javax.faces.application.StateManager;
 import javax.faces.application.ViewResource;
 
-import junit.framework.Assert;
 import org.apache.myfaces.config.RuntimeConfig;
 
 import org.apache.myfaces.mc.test.core.AbstractMyFacesRequestTestCase;
 import org.apache.myfaces.shared.config.MyfacesConfig;
+import org.junit.Assert;
 import org.junit.Test;
 
 public class ContractsCreateResourceMyFacesRequestTestCase extends AbstractMyFacesRequestTestCase
@@ -93,6 +93,9 @@ public class ContractsCreateResourceMyFa
         Resource resource2 = resourceHandler.createResource("myjs.js", "mylib");
         Assert.assertNotNull(resource2);
         
+        boolean libraryFound = resourceHandler.libraryExists("mylib");
+        Assert.assertTrue(libraryFound);
+        
         endRequest();
     }
 



Mime
View raw message