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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]