From c25439898af3201381a87360faeccaada821b508 Mon Sep 17 00:00:00 2001 From: Simon Pepping Date: Tue, 30 Nov 2004 20:20:59 +0000 Subject: [PATCH] Fixed a ClassCastException in rebind git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198180 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/fo/flow/Marker.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/java/org/apache/fop/fo/flow/Marker.java b/src/java/org/apache/fop/fo/flow/Marker.java index cb008d889..2af16dbb4 100644 --- a/src/java/org/apache/fop/fo/flow/Marker.java +++ b/src/java/org/apache/fop/fo/flow/Marker.java @@ -26,6 +26,7 @@ import org.xml.sax.Locator; import org.apache.fop.apps.FOPException; import org.apache.fop.fo.FOEventHandler; import org.apache.fop.fo.FONode; +import org.apache.fop.fo.FOText; import org.apache.fop.fo.FObj; import org.apache.fop.fo.FObjMixed; import org.apache.fop.fo.PropertyList; @@ -69,9 +70,13 @@ public class Marker extends FObjMixed { // Set a new parent property list and bind all the children again. propertyList.setParentPropertyList(parentPropertyList); for (Iterator i = children.keySet().iterator(); i.hasNext(); ) { - FObj child = (FObj) i.next(); + Object child = i.next(); PropertyList childList = (PropertyList) children.get(child); - child.bind(childList); + if (child instanceof FObj) { + ((FObj) child).bind(childList); + } else if (child instanceof FOText) { + ((FOText) child).bind(childList); + } } } -- 2.39.5