portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wea...@apache.org
Subject cvs commit: jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/deployment/fs FileSystemScanner.java
Date Fri, 16 Jan 2004 19:39:24 GMT
weaver      2004/01/16 11:39:24

  Modified:    portal/src/java/org/apache/jetspeed/deployment/fs
                        FileSystemScanner.java
  Log:
  fileDates was not being initialized
  
  Revision  Changes    Path
  1.3       +7 -4      jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/deployment/fs/FileSystemScanner.java
  
  Index: FileSystemScanner.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/deployment/fs/FileSystemScanner.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FileSystemScanner.java	15 Jan 2004 22:26:22 -0000	1.2
  +++ FileSystemScanner.java	16 Jan 2004 19:39:24 -0000	1.3
  @@ -58,6 +58,7 @@
   import java.io.FilenameFilter;
   import java.io.IOException;
   import java.util.ArrayList;
  +import java.util.HashMap;
   import java.util.List;
   import java.util.Map;
   import java.util.Set;
  @@ -89,7 +90,7 @@
       private boolean started = true;
       private List deployedFiles;
   
  -    private static final Log log = LogFactory.getLog(FileSystemScanner.class);
  +    private static final Log log = LogFactory.getLog("deployment");
   
       public FileSystemScanner(String directoryToWatch, Map fileTypeHandlers, DeploymentEventDispatcher
dispatcher, long delay)
           throws FileNotFoundException, IOException
  @@ -104,6 +105,7 @@
           this.delay = delay;
           this.dispatcher = dispatcher;
           this.deployedFiles = new ArrayList();
  +		this.fileDates = new HashMap();
   
           Set fileExtensions = fileTypeHandlers.keySet();
           this.filter = new AllowedFileTypeFilter((String[]) fileExtensions.toArray(new String[1]));
  @@ -161,8 +163,9 @@
                       // we are responsible for reclaiming the FSObject's resource
                       objHandler.close();
                       deployedFiles.add(aFile);
  -                    // record the lastModified so we can watch for re-deployment
  -                    fileDates.put(aFile, new Long(aFile.lastModified()));
  +                    // record the lastModified so we can watch for re-deployment      
             
  +                    long lastModified = aFile.lastModified();
  +                    fileDates.put(aFile, new Long(lastModified));                    
   
                   }
                   catch (Exception e1)
  
  
  

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


Mime
View raw message