freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject [2/2] incubator-freemarker git commit: Bugfix: JavaTemplateDateFormatFactory has used the same lock as JavaTemplateNumberFactory (causes unnecessary contention).
Date Fri, 24 Feb 2017 21:38:42 GMT
Bugfix: JavaTemplateDateFormatFactory has used the same lock as JavaTemplateNumberFactory (causes
unnecessary contention).


Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/68382bb9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/68382bb9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/68382bb9

Branch: refs/heads/2.3-gae
Commit: 68382bb93905c82c884b9989891f2dadec4697ea
Parents: 148d8c2
Author: ddekany <ddekany@apache.org>
Authored: Fri Feb 24 22:38:29 2017 +0100
Committer: ddekany <ddekany@apache.org>
Committed: Fri Feb 24 22:38:29 2017 +0100

----------------------------------------------------------------------
 src/main/java/freemarker/core/JavaTemplateDateFormatFactory.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/68382bb9/src/main/java/freemarker/core/JavaTemplateDateFormatFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/freemarker/core/JavaTemplateDateFormatFactory.java b/src/main/java/freemarker/core/JavaTemplateDateFormatFactory.java
index 286eeff..4ef439e 100644
--- a/src/main/java/freemarker/core/JavaTemplateDateFormatFactory.java
+++ b/src/main/java/freemarker/core/JavaTemplateDateFormatFactory.java
@@ -103,7 +103,7 @@ class JavaTemplateDateFormatFactory extends TemplateDateFormatFactory
{
             
             if (GLOBAL_FORMAT_CACHE.size() >= LEAK_ALERT_NUMBER_FORMAT_CACHE_SIZE) {
                 boolean triggered = false;
-                synchronized (JavaTemplateNumberFormatFactory.class) {
+                synchronized (JavaTemplateDateFormatFactory.class) {
                     if (GLOBAL_FORMAT_CACHE.size() >= LEAK_ALERT_NUMBER_FORMAT_CACHE_SIZE)
{
                         triggered = true;
                         GLOBAL_FORMAT_CACHE.clear();


Mime
View raw message