xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerem...@apache.org
Subject svn commit: r596600 - in /xmlgraphics/fop/trunk: src/java/org/apache/fop/area/AreaTreeHandler.java status.xml
Date Tue, 20 Nov 2007 10:20:30 GMT
Author: jeremias
Date: Tue Nov 20 02:20:29 2007
New Revision: 596600

URL: http://svn.apache.org/viewvc?rev=596600&view=rev
Log:
Bugzilla #43910:
Avoid a NullPointerException in AreaTreeHandler.endDocument().
Submitted by: David Delbecq <delbd.at.oma.be>

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/area/AreaTreeHandler.java
    xmlgraphics/fop/trunk/status.xml

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/AreaTreeHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/AreaTreeHandler.java?rev=596600&r1=596599&r2=596600&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/AreaTreeHandler.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/AreaTreeHandler.java Tue Nov 20 02:20:29
2007
@@ -21,30 +21,27 @@
 
 // Java
 import java.io.OutputStream;
-import java.util.List;
 import java.util.Iterator;
+import java.util.List;
 
-// XML
 import org.xml.sax.SAXException;
 
-// Apache
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.FormattingResults;
 import org.apache.fop.datatypes.Numeric;
 import org.apache.fop.fo.FOEventHandler;
 import org.apache.fop.fo.extensions.ExtensionAttachment;
+import org.apache.fop.fo.extensions.destination.Destination;
 import org.apache.fop.fo.pagination.PageSequence;
 import org.apache.fop.fo.pagination.Root;
 import org.apache.fop.fo.pagination.bookmarks.BookmarkTree;
-import org.apache.fop.layoutmgr.PageSequenceLayoutManager;
 import org.apache.fop.layoutmgr.LayoutManagerMaker;
 import org.apache.fop.layoutmgr.LayoutManagerMapping;
-
-import org.apache.fop.area.DestinationData;
-import org.apache.fop.fo.extensions.destination.Destination;
+import org.apache.fop.layoutmgr.PageSequenceLayoutManager;
 
 /**
  * Area tree handler for formatting objects.
@@ -261,25 +258,26 @@
 
         finishPrevPageSequence(null);
         // process fox:destination elements
-        List destinationList = rootFObj.getDestinationList();
-        if (destinationList != null) {
-            while (destinationList.size() > 0) {
-                Destination destination = (Destination) destinationList.remove(0);
-                DestinationData destinationData = new DestinationData(destination);
-                addOffDocumentItem(destinationData);
+        if (rootFObj != null) {
+            List destinationList = rootFObj.getDestinationList();
+            if (destinationList != null) {
+                while (destinationList.size() > 0) {
+                    Destination destination = (Destination) destinationList.remove(0);
+                    DestinationData destinationData = new DestinationData(destination);
+                    addOffDocumentItem(destinationData);
+                }
             }
-        }
-        // process fo:bookmark-tree
-        BookmarkTree bookmarkTree = rootFObj.getBookmarkTree();
-        if (bookmarkTree != null) {
-            BookmarkData data = new BookmarkData(bookmarkTree);
-            addOffDocumentItem(data);
-            if (!data.isResolved()) {
-                // bookmarks did not fully resolve, add anyway. (hacky? yeah)
-                model.handleOffDocumentItem(data);
+            // process fo:bookmark-tree
+            BookmarkTree bookmarkTree = rootFObj.getBookmarkTree();
+            if (bookmarkTree != null) {
+                BookmarkData data = new BookmarkData(bookmarkTree);
+                addOffDocumentItem(data);
+                if (!data.isResolved()) {
+                    // bookmarks did not fully resolve, add anyway. (hacky? yeah)
+                    model.handleOffDocumentItem(data);
+                }
             }
         }
-
         model.endDocument();
 
         if (statistics != null) {

Modified: xmlgraphics/fop/trunk/status.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/status.xml?rev=596600&r1=596599&r2=596600&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Tue Nov 20 02:20:29 2007
@@ -28,6 +28,9 @@
 
   <changes>
     <release version="FOP Trunk">
+      <action context="Code" dev="JM" type="fix" fixes-bug="43910" due-to="David Delbecq">
+        Avoid a NullPointerException in AreaTreeHandler.endDocument().
+      </action>
       <action context="Code" dev="VH" type="fix" fixes-bug="43766">
         Bugfix: breaks generated by the merging algorithm for a table-row containing empty
cells had always a
         penalty of 900.



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Mime
View raw message