velocity-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject cvs commit: jakarta-velocity/src/java/org/apache/velocity/runtime/resource ResourceManager.java
Date Thu, 15 Mar 2001 04:39:28 GMT
geirm       01/03/14 20:39:28

  Modified:    src/java/org/apache/velocity/runtime/resource
                        ResourceManager.java
  Log:
  Moved the 'how old' precheck, as the new multi-path managment stuff prevents
  us from knowing until the resource is processed.  This brings back the problem
  that the resource *can* change between load and timestamp getting, but
  that is improbable, and we will revisit later. (too tired...)
  
  Revision  Changes    Path
  1.17      +15 -10    jakarta-velocity/src/java/org/apache/velocity/runtime/resource/ResourceManager.java
  
  Index: ResourceManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/resource/ResourceManager.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- ResourceManager.java	2001/03/14 22:07:46	1.16
  +++ ResourceManager.java	2001/03/15 04:39:28	1.17
  @@ -77,7 +77,7 @@
    *
    * @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
    * @author <a href="mailto:paulo.gaspar@krankikom.de">Paulo Gaspar</a>
  - * @version $Id: ResourceManager.java,v 1.16 2001/03/14 22:07:46 jvanzyl Exp $
  + * @version $Id: ResourceManager.java,v 1.17 2001/03/15 04:39:28 geirm Exp $
    */
   public class ResourceManager
   {
  @@ -318,15 +318,20 @@
                       Runtime.info("Attempting to find " + resourceName + 
                           " with " + resourceLoader.getClassName());
                       
  -                    /*
  -                     *  read how old the resource is _before_
  -                     *  processing (=>reading) it
  -                     */
  -
  -                    howOldItWas = resourceLoader.getLastModified( resource );
  -
  + 
                       if (resource.process())
  +                    {
  +                        /*
  +                         *  FIXME  (gmj)
  +                         *  moved in here - technically still a problem - but the resource
needs to be 
  +                         *  processed before the loader can figure it out due to to the
new 
  +                         *  multi-path support - will revisit and fix
  +                         */
  +
  +                        howOldItWas = resourceLoader.getLastModified( resource );
                           break;
  +                    }
  +
                   }
                   
                   /*
  @@ -334,9 +339,9 @@
                    */
                   if (resource.getData() == null)
                       throw new ResourceNotFoundException("Can't find " + resourceName +
"!");
  -                
  +
                   resource.setLastModified( howOldItWas );
  -                
  +                 
                   resource.setModificationCheckInterval(
                       resourceLoader.getModificationCheckInterval());
                   
  
  
  

Mime
View raw message