Author: dlr
Date: Wed Sep 13 15:41:02 2006
New Revision: 443150
URL: http://svn.apache.org/viewvc?view=rev&rev=443150
Log:
Backport URLResourceLoader from trunk into the 1.4 line.
* src/java/org/apache/velocity/runtime/resource/loader/URLResourceLoader.java
URLResourceLoader from trunk (r385614), modified to work with the
Velocity 1.4 line.
* whiteboard/geir/URLResourceLoader.java
Removed.
Target branch: VEL_1_4_BRANCH
Added:
jakarta/velocity/engine/branches/VEL_1_4_BRANCH/src/java/org/apache/velocity/runtime/resource/loader/URLResourceLoader.java
- copied, changed from r443148,
jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/resource/loader/URLResourceLoader.java
Removed:
jakarta/velocity/engine/branches/VEL_1_4_BRANCH/whiteboard/geir/URLResourceLoader.java
Copied:
jakarta/velocity/engine/branches/VEL_1_4_BRANCH/src/java/org/apache/velocity/runtime/resource/loader/URLResourceLoader.java
(from r443148,
jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/resource/loader/URLResourceLoader.java)
URL:
http://svn.apache.org/viewvc/jakarta/velocity/engine/branches/VEL_1_4_BRANCH/src/java/org/apache/velocity/runtime/resource/loader/URLResourceLoader.java?view=diff&rev=443150&p1=jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/resource/loader/URLResourceLoader.java&r1=443148&p2=jakarta/velocity/engine/branches/VEL_1_4_BRANCH/src/java/org/apache/velocity/runtime/resource/loader/URLResourceLoader.java&r2=443150
==============================================================================
---
jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/resource/loader/URLResourceLoader.java
(original)
+++
jakarta/velocity/engine/branches/VEL_1_4_BRANCH/src/java/org/apache/velocity/runtime/resource/loader/URLResourceLoader.java
Wed Sep 13 15:41:02 2006
@@ -40,22 +40,19 @@
public void init(ExtendedProperties configuration)
{
- log.trace("URLResourceLoader : initialization starting.");
+ rsvc.info("URLResourceLoader : initialization starting.");
roots = configuration.getStringArray("root");
- if (log.isInfoEnabled())
+ for (int i=0; i < roots.length; i++)
{
- for (int i=0; i < roots.length; i++)
- {
- log.info("URLResourceLoader : adding root '" + roots[i] + "'");
- }
+ rsvc.info("URLResourceLoader : adding root '" + roots[i] + "'");
}
// init the template paths map
templateRoots = new HashMap();
- log.trace("URLResourceLoader : initialization complete.");
+ rsvc.info("URLResourceLoader : initialization complete.");
}
/**
@@ -86,8 +83,6 @@
if (inputStream != null)
{
- if (log.isDebugEnabled()) log.debug("URLResourceLoader:
Found '"+name+"' at '"+roots[i]+"'");
-
// save this root for later re-use
templateRoots.put(name, roots[i]);
break;
@@ -95,7 +90,7 @@
}
catch(IOException ioe)
{
- if (log.isDebugEnabled()) log.debug("URLResourceLoader:
Exception when looking for '"+name+"' at '"+roots[i]+"'", ioe);
+ rsvc.debug("URLResourceLoader: Exception when looking for
'"+name+"' at '"+roots[i]+"'");
// only save the first one for later throwing
if (exception == null)
@@ -164,8 +159,8 @@
catch (IOException ioe)
{
// the file is not reachable at its previous address
- log.warn("URLResourceLoader: '" + name +
- "' is no longer reachable at '" + root + "'", ioe);
+ rsvc.warn("URLResourceLoader: '" + name +
+ "' is no longer reachable at '" + root + "'");
return 0;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]