]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
FOP-2472: Add method to allow clearing the hyphenation tree cache at runtime, as...
authorAndreas L. Delmelle <adelmelle@apache.org>
Sun, 24 May 2015 11:35:19 +0000 (11:35 +0000)
committerAndreas L. Delmelle <adelmelle@apache.org>
Sun, 24 May 2015 11:35:19 +0000 (11:35 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1681436 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/hyphenation/Hyphenator.java

index 48af67d09152944bc3825629098864fbb2a90db9..ed992427ad9883bb0d138d68828220a21ff4aea9 100644 (file)
@@ -63,6 +63,14 @@ public final class Hyphenator {
         return hTreeCache;
     }
 
+    /**
+     * Clears the default hyphenation tree cache.<br>
+     * This method can be used if the underlying data files are changed at runtime.
+     */
+    public static synchronized void clearHyphenationTreeCache() {
+        hTreeCache = new HyphenationTreeCache();
+    }
+
     /**
      * Returns a hyphenation tree for a given language and country,
      * with fallback from (lang,country) to (lang).