Browse Source

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
tags/fop-1_0
Andreas L. Delmelle 16 years ago
parent
commit
5b92a2b32f
2 changed files with 11 additions and 4 deletions
  1. 6
    4
      src/java/org/apache/fop/hyphenation/Hyphenator.java
  2. 5
    0
      status.xml

+ 6
- 4
src/java/org/apache/fop/hyphenation/Hyphenator.java View 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 {

+ 5
- 0
status.xml View File

@@ -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)

Loading…
Cancel
Save