You are viewing a plain text version of this content. The canonical link for it is here.
Posted to portalapps-dev@portals.apache.org by wo...@apache.org on 2012/05/18 20:06:04 UTC

svn commit: r1340195 - /portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/util/WebResourceUtils.java

Author: woonsan
Date: Fri May 18 18:06:04 2012
New Revision: 1340195

URL: http://svn.apache.org/viewvc?rev=1340195&view=rev
Log:
APA-48: checking null (file cannot be detected in the unexpanded war deployment; in that case, it just returns null)

Modified:
    portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/util/WebResourceUtils.java

Modified: portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/util/WebResourceUtils.java
URL: http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/util/WebResourceUtils.java?rev=1340195&r1=1340194&r2=1340195&view=diff
==============================================================================
--- portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/util/WebResourceUtils.java (original)
+++ portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/util/WebResourceUtils.java Fri May 18 18:06:04 2012
@@ -208,6 +208,11 @@ public class WebResourceUtils
     public static File [] getResourcesAsFiles(String resourcePath, ClassLoader classloader, Object context)
     {
         File file = getResourceAsFile(resourcePath, classloader, context);
+
+        if (file == null) {
+        	return null;
+        }
+
         File parent = file.getParentFile();
         FilenameFilter filter = new GlobFilenameFilter(file.getName());
         return parent.listFiles(filter);