You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by le...@apache.org on 2001/07/09 12:56:15 UTC
cvs commit: jakarta-turbine/src/java/org/apache/turbine/services/xslt TurbineXSLTService.java
leonm 01/07/09 03:56:15
Modified: src/java/org/apache/turbine/services/xslt
TurbineXSLTService.java
Log:
Fixed a minor bug with the compiled stylesheet caching.
It was possible to have multiple copies of the same compiled stylesheet in memory.
Revision Changes Path
1.14 +6 -7 jakarta-turbine/src/java/org/apache/turbine/services/xslt/TurbineXSLTService.java
Index: TurbineXSLTService.java
===================================================================
RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/services/xslt/TurbineXSLTService.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- TurbineXSLTService.java 2001/06/23 07:12:23 1.13
+++ TurbineXSLTService.java 2001/07/09 10:56:12 1.14
@@ -200,20 +200,19 @@
{
synchronized (cache)
{
- if (caching && cache.containsKey (xslName))
- {
- return (Templates)cache.get(xslName);
- }
-
String fn = getFileName (xslName);
-
if (fn == null) return null;
+ if (caching && cache.containsKey (fn))
+ {
+ return (Templates)cache.get(fn);
+ }
+
Templates sr = compileTemplates (fn);
if (caching)
{
- cache.put (xslName,sr);
+ cache.put (fn,sr);
}
return sr;
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org