shale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@apache.org
Subject svn commit: r476426 - /shale/framework/trunk/shale-tiger/src/main/java/org/apache/shale/tiger/view/faces/LifecycleListener2.java
Date Sat, 18 Nov 2006 03:31:23 GMT
Author: craigmcc
Date: Fri Nov 17 19:31:22 2006
New Revision: 476426

URL: http://svn.apache.org/viewvc?view=rev&rev=476426
Log:
If the "javax.faces.CONFIG_FILES" context init parameter specifies missing
configuration resources, silently ignore them (on the assumption that the
JSF implementation will have already complained) rather than throwing NPE.

Fix based on a patch from Mario Ivankovits (thanks Mario!) but expaded to
cover the case where a comma separated list of resources is defined also.

SHALE-332

Modified:
    shale/framework/trunk/shale-tiger/src/main/java/org/apache/shale/tiger/view/faces/LifecycleListener2.java

Modified: shale/framework/trunk/shale-tiger/src/main/java/org/apache/shale/tiger/view/faces/LifecycleListener2.java
URL: http://svn.apache.org/viewvc/shale/framework/trunk/shale-tiger/src/main/java/org/apache/shale/tiger/view/faces/LifecycleListener2.java?view=diff&rev=476426&r1=476425&r2=476426
==============================================================================
--- shale/framework/trunk/shale-tiger/src/main/java/org/apache/shale/tiger/view/faces/LifecycleListener2.java
(original)
+++ shale/framework/trunk/shale-tiger/src/main/java/org/apache/shale/tiger/view/faces/LifecycleListener2.java
Fri Nov 17 19:31:22 2006
@@ -975,11 +975,17 @@
             if (comma < 0) {
                 resources = resources.trim();
                 if (resources.length() > 0) {
-                    list.add(servletContext.getResource(resources));
+                    URL url = servletContext.getResource(resources);
+                    if (url != null) {
+                        list.add(url);
+                    }
                 }
                 resources = "";
             } else {
-                list.add(servletContext.getResource(resources.substring(0, comma).trim()));
+                URL url = servletContext.getResource(resources.substring(0, comma).trim());
+                if (url != null) {
+                    list.add(url);
+                }
                 resources = resources.substring(comma + 1);
             }
         }



Mime
View raw message