diff options
Diffstat (limited to 'src/java/org/apache')
-rw-r--r-- | src/java/org/apache/fop/hyphenation/Hyphenator.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/java/org/apache/fop/hyphenation/Hyphenator.java b/src/java/org/apache/fop/hyphenation/Hyphenator.java index 3d9ef9eb8..a537a9d01 100644 --- a/src/java/org/apache/fop/hyphenation/Hyphenator.java +++ b/src/java/org/apache/fop/hyphenation/Hyphenator.java @@ -255,11 +255,13 @@ public class Hyphenator { if (source instanceof StreamSource) { in = ((StreamSource) source).getInputStream(); } - if (in == null && source.getSystemId() != null) { - in = new java.net.URL(source.getSystemId()).openStream(); - } else { - throw new UnsupportedOperationException("Cannot load hyphenation pattern file" + if (in == null) { + if (source.getSystemId() != null) { + in = new java.net.URL(source.getSystemId()).openStream(); + } else { + throw new UnsupportedOperationException("Cannot load hyphenation pattern file" + " with the supplied Source object: " + source); + } } in = new BufferedInputStream(in); try { |