From 5b92a2b32f19f208ab1313339a141efc15e35a3e Mon Sep 17 00:00:00 2001 From: "Andreas L. Delmelle" Date: Sat, 26 Apr 2008 20:06:04 +0000 Subject: [PATCH] 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 --- src/java/org/apache/fop/hyphenation/Hyphenator.java | 10 ++++++---- status.xml | 5 +++++ 2 files changed, 11 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 { diff --git a/status.xml b/status.xml index a289dadc9..ca4768446 100644 --- a/status.xml +++ b/status.xml @@ -57,6 +57,11 @@ Added SVG support for AFP (GOCA). + + Fixed a logic error in Hyphenator.java: + If the source had an associated InputStream, an UnsupportedOperationException was + triggered. + Add partial support for the "show-destination" property on fo:basic-link (PDF output only; see limitations on the compliance page) -- 2.39.5