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 je...@apache.org on 2006/06/27 20:16:31 UTC
svn commit: r417542 -
/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/PageViewport.java
Author: jeremias
Date: Tue Jun 27 11:16:31 2006
New Revision: 417542
URL: http://svn.apache.org/viewvc?rev=417542&view=rev
Log:
Fix NPE in case there are no extension attachments and the area tree was built from the intermediate format.
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/area/PageViewport.java
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/PageViewport.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/PageViewport.java?rev=417542&r1=417541&r2=417542&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/PageViewport.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/PageViewport.java Tue Jun 27 11:16:31 2006
@@ -23,6 +23,7 @@
import java.io.ObjectOutputStream;
import java.io.ObjectInputStream;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
@@ -563,7 +564,11 @@
/** @return the list of extension attachments for this page */
public List getExtensionAttachments() {
- return this.extensionAttachments;
+ if (this.extensionAttachments == null) {
+ return Collections.EMPTY_LIST;
+ } else {
+ return this.extensionAttachments;
+ }
}
/** @return True if this is a blank page. */
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org