From c09005ac4164ee2d632541cb4b7a3bcfe91e51cf Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Mon, 17 Oct 2005 08:28:57 +0000 Subject: [PATCH] Fixes NPE when test:assert is used as direct child of an fo:table. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_SpaceResolution@325859 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/fo/flow/Table.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/java/org/apache/fop/fo/flow/Table.java b/src/java/org/apache/fop/fo/flow/Table.java index 47047d41f..42585a6b4 100644 --- a/src/java/org/apache/fop/fo/flow/Table.java +++ b/src/java/org/apache/fop/fo/flow/Table.java @@ -24,9 +24,7 @@ import java.util.List; import org.xml.sax.Locator; import org.apache.fop.apps.FOPException; -import org.apache.fop.datatypes.Numeric; import org.apache.fop.fo.FONode; -import org.apache.fop.fo.FObj; import org.apache.fop.fo.PropertyList; import org.apache.fop.fo.StaticPropertyList; import org.apache.fop.fo.ValidationException; @@ -217,11 +215,11 @@ public class Table extends TableFObj { * @see org.apache.fop.fo.FONode#addChildNode(FONode) */ protected void addChildNode(FONode child) throws FOPException { - if (child.getName().equals("fo:table-column")) { + if ("fo:table-column".equals(child.getName())) { addColumnNode((TableColumn) child); - } else if (child.getName().equals("fo:table-footer")) { + } else if ("fo:table-footer".equals(child.getName())) { tableFooter = (TableBody)child; - } else if (child.getName().equals("fo:table-header")) { + } else if ("fo:table-header".equals(child.getName())) { tableHeader = (TableBody)child; } else { // add bodies -- 2.39.5