From: Jeremias Maerki Date: Fri, 5 Oct 2007 12:34:33 +0000 (+0000) Subject: Bugzilla #43464: X-Git-Tag: fop-0_95beta~377 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=11bc74fa2ba69a0bb118ef2a55eb7f7b66f827f6;p=xmlgraphics-fop.git 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 git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@582230 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/render/PrintRendererConfigurator.java b/src/java/org/apache/fop/render/PrintRendererConfigurator.java index d9b922965..0b352c3a1 100644 --- a/src/java/org/apache/fop/render/PrintRendererConfigurator.java +++ b/src/java/org/apache/fop/render/PrintRendererConfigurator.java @@ -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); diff --git a/status.xml b/status.xml index f9fb720d7..f04c2b081 100644 --- a/status.xml +++ b/status.xml @@ -28,6 +28,9 @@ + + Fix to avoid a ClassCastException in renderer configuration. + Fixed the restoration of the TLE values from the intermediate format for the AFP extension elements.