Author: adelmelle
Date: Sat Apr 26 13:06:04 2008
New Revision: 651853

URL: http://svn.apache.org/viewvc?rev=651853&view=rev
Log:
Bugzilla 44203:
Fixed a logic error in Hyphenator.java where an UnsupportedOperationException 
was erroneously thrown if the supplied source had an associated InputStream.

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/hyphenation/Hyphenator.java
    xmlgraphics/fop/trunk/status.xml

Modified: 
xmlgraphics/fop/trunk/src/java/org/apache/fop/hyphenation/Hyphenator.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/hyphenation/Hyphenator.java?rev=651853&r1=651852&r2=651853&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/hyphenation/Hyphenator.java 
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/hyphenation/Hyphenator.java 
Sat Apr 26 13:06:04 2008
@@ -255,11 +255,13 @@
                 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 {

Modified: xmlgraphics/fop/trunk/status.xml
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/status.xml?rev=651853&r1=651852&r2=651853&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Sat Apr 26 13:06:04 2008
@@ -57,6 +57,11 @@
       <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)



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to