You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ke...@locus.apache.org on 2000/08/11 02:46:51 UTC

cvs commit: xml-fop/src/org/apache/fop/fo FOTreeBuilder.java

keiron      00/08/10 17:46:51

  Modified:    src/org/apache/fop/fo FOTreeBuilder.java
  Log:
  fixes an npe if we get an unknown namespace
  
  Revision  Changes    Path
  1.11      +7 -7      xml-fop/src/org/apache/fop/fo/FOTreeBuilder.java
  
  Index: FOTreeBuilder.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/FOTreeBuilder.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- FOTreeBuilder.java	2000/08/03 05:34:53	1.10
  +++ FOTreeBuilder.java	2000/08/11 00:46:51	1.11
  @@ -1,4 +1,4 @@
  -/*-- $Id: FOTreeBuilder.java,v 1.10 2000/08/03 05:34:53 keiron Exp $ -- 
  +/*-- $Id: FOTreeBuilder.java,v 1.11 2000/08/11 00:46:51 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -82,8 +82,6 @@
        * 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 void startElement(String uri,
       	String localName, String rawName, Attributes attlist)
   	throws SAXException { 
  -
   	/* the formatting object started */
   	FObj fobj;
   
  @@ -251,7 +248,7 @@
   	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 @@
   	}
   	
   	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);