geirm 01/03/22 07:55:37
Modified: src/java/org/apache/velocity/runtime/resource
ResourceManager.java
Log:
Fixed problem reported by Ilkka Priha <[EMAIL PROTECTED]> - we weren't
getting the resourceloader from the resource in question on a cache refresh.
Revision Changes Path
1.20 +4 -3
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.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- ResourceManager.java 2001/03/20 17:28:26 1.19
+++ ResourceManager.java 2001/03/22 15:55:37 1.20
@@ -78,7 +78,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Paulo Gaspar</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Geir Magnusson Jr.</a>
- * @version $Id: ResourceManager.java,v 1.19 2001/03/20 17:28:26 geirm Exp $
+ * @version $Id: ResourceManager.java,v 1.20 2001/03/22 15:55:37 geirm Exp $
*/
public class ResourceManager
{
@@ -219,7 +219,6 @@
throws ResourceNotFoundException, ParseErrorException, Exception
{
Resource resource = null;
- ResourceLoader resourceLoader = null;
/*
* Check to see if the resource was placed in the cache.
@@ -256,7 +255,7 @@
* read how old the resource is _before_
* processing (=>reading) it
*/
- long howOldItWas = resourceLoader.getLastModified( resource
);
+ long howOldItWas =
resource.getResourceLoader().getLastModified( resource );
/*
* read in the fresh stream and parse
@@ -313,6 +312,8 @@
//! Bug this is being run more then once!
long howOldItWas = 0; // Initialize to avoid warnings
+
+ ResourceLoader resourceLoader = null;
for (int i = 0; i < resourceLoaders.size(); i++)
{