aboutsummaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
authorAndreas L. Delmelle <adelmelle@apache.org>2015-05-24 11:35:19 +0000
committerAndreas L. Delmelle <adelmelle@apache.org>2015-05-24 11:35:19 +0000
commita34e033deebcd9ea3d4fef7809271d6ab854dc60 (patch)
tree0e4852fd5656b44bd8bd6857f0f0774b42202d74 /src/java
parent8f55e549f6e21b77cc746f7467400f241dd46d93 (diff)
downloadxmlgraphics-fop-a34e033deebcd9ea3d4fef7809271d6ab854dc60.tar.gz
xmlgraphics-fop-a34e033deebcd9ea3d4fef7809271d6ab854dc60.zip
FOP-2472: Add method to allow clearing the hyphenation tree cache at runtime, as suggested by Marc Wiest
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1681436 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r--src/java/org/apache/fop/hyphenation/Hyphenator.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/hyphenation/Hyphenator.java b/src/java/org/apache/fop/hyphenation/Hyphenator.java
index 48af67d09..ed992427a 100644
--- a/src/java/org/apache/fop/hyphenation/Hyphenator.java
+++ b/src/java/org/apache/fop/hyphenation/Hyphenator.java
@@ -64,6 +64,14 @@ public final class Hyphenator {
}
/**
+ * 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).
* The hyphenation trees are cached.