You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@click.apache.org by bc...@apache.org on 2010/06/18 09:56:24 UTC
svn commit: r955876 -
/click/trunk/click/framework/src/org/apache/velocity/tools/view/WebappResourceLoader.java
Author: bckfnn
Date: Fri Jun 18 07:56:24 2010
New Revision: 955876
URL: http://svn.apache.org/viewvc?rev=955876&view=rev
Log:
reverting part of r955743, keep file as-is, it is a copy from velocity. CLK-696
Modified:
click/trunk/click/framework/src/org/apache/velocity/tools/view/WebappResourceLoader.java
Modified: click/trunk/click/framework/src/org/apache/velocity/tools/view/WebappResourceLoader.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/velocity/tools/view/WebappResourceLoader.java?rev=955876&r1=955875&r2=955876&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/velocity/tools/view/WebappResourceLoader.java (original)
+++ click/trunk/click/framework/src/org/apache/velocity/tools/view/WebappResourceLoader.java Fri Jun 18 07:56:24 2010
@@ -55,7 +55,7 @@ public class WebappResourceLoader extend
{
/** The root paths for templates (relative to webapp's root). */
protected String[] paths = null;
- protected HashMap<String, String> templatePaths = null;
+ protected HashMap templatePaths = null;
protected ServletContext servletContext = null;
@@ -69,7 +69,6 @@ public class WebappResourceLoader extend
* @param configuration the {@link ExtendedProperties} associated with
* this resource loader.
*/
- @Override
public void init(ExtendedProperties configuration)
{
log.trace("WebappResourceLoader: initialization starting.");
@@ -106,7 +105,7 @@ public class WebappResourceLoader extend
}
/* init the template paths map */
- templatePaths = new HashMap<String, String>();
+ templatePaths = new HashMap();
log.trace("WebappResourceLoader: initialization complete.");
}
@@ -120,7 +119,6 @@ public class WebappResourceLoader extend
* @throws ResourceNotFoundException if template not found
* in classpath.
*/
- @Override
public synchronized InputStream getResourceStream(String name)
throws ResourceNotFoundException
{
@@ -200,7 +198,7 @@ public class WebappResourceLoader extend
fileName = fileName.substring(1);
}
- String savedPath = templatePaths.get(fileName);
+ String savedPath = (String)templatePaths.get(fileName);
return new File(rootPath + savedPath, fileName);
}
@@ -211,7 +209,6 @@ public class WebappResourceLoader extend
* @param resource Resource The resource to check for modification
* @return boolean True if the resource has been modified
*/
- @Override
public boolean isSourceModified(Resource resource)
{
String rootPath = servletContext.getRealPath("/");
@@ -265,7 +262,6 @@ public class WebappResourceLoader extend
* @param resource Resource the resource to check
* @return long The time when the resource was last modified or 0 if the file can't be read
*/
- @Override
public long getLastModified(Resource resource)
{
String rootPath = servletContext.getRealPath("/");