diff options
author | Andreas L. Delmelle <adelmelle@apache.org> | 2008-04-26 20:06:04 +0000 |
---|---|---|
committer | Andreas L. Delmelle <adelmelle@apache.org> | 2008-04-26 20:06:04 +0000 |
commit | 5b92a2b32f19f208ab1313339a141efc15e35a3e (patch) | |
tree | 48dff975384e0abd6fb71fbd1aef016da2221143 /src/java/org | |
parent | 46ddb807a234655e106f4949d1474e857a025d17 (diff) | |
download | xmlgraphics-fop-5b92a2b32f19f208ab1313339a141efc15e35a3e.tar.gz xmlgraphics-fop-5b92a2b32f19f208ab1313339a141efc15e35a3e.zip |
Bugzilla 44203:
Fixed a logic error in Hyphenator.java where an UnsupportedOperationException was erroneously thrown if the supplied source had an associated InputStream.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@651853 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org')
-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 { |