You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@freemarker.apache.org by dd...@apache.org on 2017/03/01 14:21:25 UTC

[27/50] [abbrv] incubator-freemarker git commit: (Fixed some typos)

(Fixed some typos)


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

Branch: refs/heads/2.3
Commit: e34f70bac64fd2ae1defa0e0b25c00a6c7a19ad4
Parents: 68382bb
Author: ddekany <dd...@apache.org>
Authored: Sun Feb 26 01:55:46 2017 +0100
Committer: ddekany <dd...@apache.org>
Committed: Sun Feb 26 01:55:46 2017 +0100

----------------------------------------------------------------------
 .../java/freemarker/core/JavaTemplateDateFormatFactory.java  | 8 ++++----
 src/main/java/freemarker/template/_TemplateAPI.java          | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/e34f70ba/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 4ef439e..74fb467 100644
--- a/src/main/java/freemarker/core/JavaTemplateDateFormatFactory.java
+++ b/src/main/java/freemarker/core/JavaTemplateDateFormatFactory.java
@@ -37,7 +37,7 @@ class JavaTemplateDateFormatFactory extends TemplateDateFormatFactory {
 
     private static final ConcurrentHashMap<CacheKey, DateFormat> GLOBAL_FORMAT_CACHE
             = new ConcurrentHashMap<CacheKey, DateFormat>();
-    private static final int LEAK_ALERT_NUMBER_FORMAT_CACHE_SIZE = 1024;
+    private static final int LEAK_ALERT_DATE_FORMAT_CACHE_SIZE = 1024;
     
     private JavaTemplateDateFormatFactory() {
         // Can't be instantiated
@@ -101,16 +101,16 @@ class JavaTemplateDateFormatFactory extends TemplateDateFormatFactory {
             }
             jFormat.setTimeZone(cacheKey.timeZone);
             
-            if (GLOBAL_FORMAT_CACHE.size() >= LEAK_ALERT_NUMBER_FORMAT_CACHE_SIZE) {
+            if (GLOBAL_FORMAT_CACHE.size() >= LEAK_ALERT_DATE_FORMAT_CACHE_SIZE) {
                 boolean triggered = false;
                 synchronized (JavaTemplateDateFormatFactory.class) {
-                    if (GLOBAL_FORMAT_CACHE.size() >= LEAK_ALERT_NUMBER_FORMAT_CACHE_SIZE) {
+                    if (GLOBAL_FORMAT_CACHE.size() >= LEAK_ALERT_DATE_FORMAT_CACHE_SIZE) {
                         triggered = true;
                         GLOBAL_FORMAT_CACHE.clear();
                     }
                 }
                 if (triggered) {
-                    LOG.warn("Global Java DateFormat cache has exceeded " + LEAK_ALERT_NUMBER_FORMAT_CACHE_SIZE
+                    LOG.warn("Global Java DateFormat cache has exceeded " + LEAK_ALERT_DATE_FORMAT_CACHE_SIZE
                             + " entries => cache flushed. "
                             + "Typical cause: Some template generates high variety of format pattern strings.");
                 }

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/e34f70ba/src/main/java/freemarker/template/_TemplateAPI.java
----------------------------------------------------------------------
diff --git a/src/main/java/freemarker/template/_TemplateAPI.java b/src/main/java/freemarker/template/_TemplateAPI.java
index 52606f6..5942a35 100644
--- a/src/main/java/freemarker/template/_TemplateAPI.java
+++ b/src/main/java/freemarker/template/_TemplateAPI.java
@@ -142,7 +142,7 @@ public class _TemplateAPI {
             && tagSyntax != Configuration.ANGLE_BRACKET_TAG_SYNTAX) {
             throw new IllegalArgumentException("\"tag_syntax\" can only be set to one of these: "
                     + "Configuration.AUTO_DETECT_TAG_SYNTAX, Configuration.ANGLE_BRACKET_SYNTAX, "
-                    + "or Configuration.SQAUARE_BRACKET_SYNTAX");
+                    + "or Configuration.SQUARE_BRACKET_SYNTAX");
         }
     }