]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
fixes an npe if we get an unknown namespace
authorKeiron Liddle <keiron@apache.org>
Fri, 11 Aug 2000 00:46:51 +0000 (00:46 +0000)
committerKeiron Liddle <keiron@apache.org>
Fri, 11 Aug 2000 00:46:51 +0000 (00:46 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193628 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/fo/FOTreeBuilder.java

index 564db13cd65059b86771e043a81d8b3bf5db1aa0..51c2941e90971464997a61a7ea708e836308cd30 100644 (file)
@@ -82,8 +82,6 @@ public class FOTreeBuilder extends DefaultHandler {
      * class that builds a property list for each formatting object
      */
     protected Hashtable propertylistTable = new Hashtable();
-//    protected PropertyListBuilder propertyListBuilder = new
-//     PropertyListBuilder(); 
        
     /**
      * current formatting object being handled
@@ -226,7 +224,6 @@ public class FOTreeBuilder extends DefaultHandler {
     public void startElement(String uri,
        String localName, String rawName, Attributes attlist)
        throws SAXException { 
-
        /* the formatting object started */
        FObj fobj;
 
@@ -251,7 +248,7 @@ public class FOTreeBuilder extends DefaultHandler {
        String fullName = mapName(rawName);
 
        fobjMaker = (FObj.Maker) fobjTable.get(fullName);
-       PropertyListBuilder plBuilder = (PropertyListBuilder)this.propertylistTable.get(uri);
+    PropertyListBuilder currentListBuilder = (PropertyListBuilder)this.propertylistTable.get(uri);
 
        if (fobjMaker == null) {
            if (!this.unknownFOs.containsKey(fullName)) {
@@ -263,8 +260,11 @@ public class FOTreeBuilder extends DefaultHandler {
        }
        
        try {
-               PropertyList list = plBuilder.makeList(fullName, attlist,  
-                    (currentFObj == null) ? null : currentFObj.properties);
+               PropertyList list = null;
+               if(currentListBuilder != null) {
+                       list = currentListBuilder.makeList(fullName, attlist,  
+                            (currentFObj == null) ? null : currentFObj.properties);
+               }
            fobj = fobjMaker.make(currentFObj, list);
        } catch (FOPException e) {
                throw new SAXException(e);