aboutsummaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
authorGlenn Adams <gadams@apache.org>2014-10-09 04:48:19 +0000
committerGlenn Adams <gadams@apache.org>2014-10-09 04:48:19 +0000
commitc7a46a8f4e7d4b97d241ceba582364bf0287cf27 (patch)
treebe8d812656a21ac8e7a382db85b01b20b0cd5d12 /src/java
parentef5390b57f25545cd3f281965dae6e8f1a90676e (diff)
downloadxmlgraphics-fop-c7a46a8f4e7d4b97d241ceba582364bf0287cf27.tar.gz
xmlgraphics-fop-c7a46a8f4e7d4b97d241ceba582364bf0287cf27.zip
FOP-2415: prevent NPE when Indic script syllabizer is not available
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1630279 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r--src/java/org/apache/fop/complexscripts/scripts/IndicScriptProcessor.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/complexscripts/scripts/IndicScriptProcessor.java b/src/java/org/apache/fop/complexscripts/scripts/IndicScriptProcessor.java
index a341ef123..ad533b843 100644
--- a/src/java/org/apache/fop/complexscripts/scripts/IndicScriptProcessor.java
+++ b/src/java/org/apache/fop/complexscripts/scripts/IndicScriptProcessor.java
@@ -216,7 +216,7 @@ public class IndicScriptProcessor extends DefaultScriptProcessor {
}
private GlyphSequence[] syllabize(GlyphSequence gs, String script, String language) {
- return Syllabizer.getSyllabizer(script, language, getSyllabizerClass()) .syllabize(gs);
+ return Syllabizer.getSyllabizer(script, language, getSyllabizerClass()).syllabize(gs);
}
private GlyphSequence unsyllabize(GlyphSequence gs, GlyphSequence[] sa) {
@@ -405,7 +405,8 @@ public class IndicScriptProcessor extends DefaultScriptProcessor {
String sid = makeSyllabizerId(script, language);
Syllabizer s = syllabizers.get(sid);
if (s == null) {
- if ((s = makeSyllabizer(script, language, syllabizerClass)) == null) {
+ if ((syllabizerClass == null) || ((s = makeSyllabizer(script, language, syllabizerClass)) == null)) {
+ log.warn("No syllabizer available for script '" + script + "', language '" + language + "', using default Indic syllabizer.");
s = new DefaultSyllabizer(script, language);
}
syllabizers.put(sid, s);