]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Fixes NPE when test:assert is used as direct child of an fo:table.
authorJeremias Maerki <jeremias@apache.org>
Mon, 17 Oct 2005 08:28:57 +0000 (08:28 +0000)
committerJeremias Maerki <jeremias@apache.org>
Mon, 17 Oct 2005 08:28:57 +0000 (08:28 +0000)
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

index 47047d41f1887c4b7116eebcf4c9a2e9c3f2ba47..42585a6b4c90739bb8bb611a404b38f3fff5064c 100644 (file)
@@ -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