]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Bugzilla 44203:
authorAndreas L. Delmelle <adelmelle@apache.org>
Sat, 26 Apr 2008 20:06:04 +0000 (20:06 +0000)
committerAndreas L. Delmelle <adelmelle@apache.org>
Sat, 26 Apr 2008 20:06:04 +0000 (20:06 +0000)
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
status.xml

index 3d9ef9eb89232c9076d4792e144eec2e998083f8..a537a9d01e28eea4161ce68e3f9d8e70b5651b5b 100644 (file)
@@ -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 {
index a289dadc9bc2c7f713551d9fa207852a694759e7..ca47684461b734891ac74c97ae4d4f3f1fa809b4 100644 (file)
       <action context="Renderers" dev="AC" importance="high" type="add">
         Added SVG support for AFP (GOCA).
       </action -->
+      <action context="Code" dev="AD" type="fix" fixed-bug="44203">
+        Fixed a logic error in Hyphenator.java:
+        If the source had an associated InputStream, an UnsupportedOperationException was
+        triggered.
+      </action>
       <action context="Code" dev="AD" type="add" fixes-bug="44634">
         Add partial support for the "show-destination" property on fo:basic-link
         (PDF output only; see limitations on the compliance page)