portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r502801 - /portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/deployment/impl/StandardDeploymentManager.java
Date Fri, 02 Feb 2007 23:58:12 GMT
Author: ate
Date: Fri Feb  2 15:58:11 2007
New Revision: 502801

URL: http://svn.apache.org/viewvc?view=rev&rev=502801
Log:
Suppress unneeded warning about unrecognized README.txt files in the auto deployment directories

Modified:
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/deployment/impl/StandardDeploymentManager.java

Modified: portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/deployment/impl/StandardDeploymentManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/deployment/impl/StandardDeploymentManager.java?view=diff&rev=502801&r1=502800&r2=502801
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/deployment/impl/StandardDeploymentManager.java
(original)
+++ portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/deployment/impl/StandardDeploymentManager.java
Fri Feb  2 15:58:11 2007
@@ -16,6 +16,7 @@
 package org.apache.jetspeed.deployment.impl;
 
 import java.io.File;
+import java.io.FileFilter;
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.util.ArrayList;
@@ -46,6 +47,14 @@
  */
 public class StandardDeploymentManager implements DeploymentManager
 {
+    private static final FileFilter readmeIgnoringFileFilter = new FileFilter()
+    {
+        public boolean accept(File file)
+        {
+            return !file.getName().equalsIgnoreCase("README.txt");
+        }
+    };
+    
     protected Log               log = LogFactory.getLog("deployment");
     protected FileSystemScanner scanner;
     protected PortletRegistry   registry;
@@ -192,9 +201,6 @@
             File aFile = stagedFiles[i];
             if (aFile.isFile() && !ignoreFile(aFile))
             {
-                boolean failed = false;
-                boolean unknown = false;
-
                 DeploymentStatus status = null;
                 Exception de = null;
                 try
@@ -305,7 +311,7 @@
         ArrayList fileList = new ArrayList();
         for (int i = 0; i < stagingDirectoriesAsFiles.length; i++)
         {
-            fileList.addAll(Arrays.asList(stagingDirectoriesAsFiles[i].listFiles()));
+            fileList.addAll(Arrays.asList(stagingDirectoriesAsFiles[i].listFiles(readmeIgnoringFileFilter)));
         }
 
         return (File[]) fileList.toArray(new File[fileList.size()]);



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message