Parcourir la source

Bugzilla #43464:

There is no need to cast the sources into a StreamSource to determine
the SystemId. With this cast DOMSources or other non-StreamSources lead in a
ClassCastException.
Submitted by: Bruno Feurer <dev.at.brunof.com>

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@582230 13f79535-47bb-0310-9956-ffa450edef68
tags/fop-0_95beta
Jeremias Maerki il y a 16 ans
Parent
révision
11bc74fa2b
2 fichiers modifiés avec 6 ajouts et 3 suppressions
  1. 3
    3
      src/java/org/apache/fop/render/PrintRendererConfigurator.java
  2. 3
    0
      status.xml

+ 3
- 3
src/java/org/apache/fop/render/PrintRendererConfigurator.java Voir le fichier

@@ -25,7 +25,7 @@ import java.net.URL;
import java.util.Iterator;
import java.util.List;

import javax.xml.transform.stream.StreamSource;
import javax.xml.transform.Source;

import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.ConfigurationException;
@@ -247,7 +247,7 @@ public class PrintRendererConfigurator extends AbstractRendererConfigurator
return null;
}
if (embedUrl != null) {
StreamSource source = (StreamSource)fontResolver.resolve(embedUrl);
Source source = fontResolver.resolve(embedUrl);
if (source == null) {
LogUtil.handleError(log,
"Failed to resolve font with embed-url '" + embedUrl + "'", strict);
@@ -256,7 +256,7 @@ public class PrintRendererConfigurator extends AbstractRendererConfigurator
embedUrl = source.getSystemId(); // absolute path/url
}
if (metricsUrl != null) {
StreamSource source = (StreamSource)fontResolver.resolve(metricsUrl);
Source source = fontResolver.resolve(metricsUrl);
if (source == null) {
LogUtil.handleError(log,
"Failed to resolve font with metric-url '" + metricsUrl + "'", strict);

+ 3
- 0
status.xml Voir le fichier

@@ -28,6 +28,9 @@

<changes>
<release version="FOP Trunk">
<action context="Code" dev="JM" type="fix" fixes-bug="43464" due-to="Bruno Feurer">
Fix to avoid a ClassCastException in renderer configuration.
</action>
<action context="Code" dev="JM" type="fix" fixes-bug="43439" due-to="Adrian Cumiskey">
Fixed the restoration of the TLE values from the intermediate format
for the AFP extension elements.

Chargement…
Annuler
Enregistrer