diff options
author | Andreas L. Delmelle <adelmelle@apache.org> | 2008-06-26 19:44:20 +0000 |
---|---|---|
committer | Andreas L. Delmelle <adelmelle@apache.org> | 2008-06-26 19:44:20 +0000 |
commit | d9ccf5f4edf32a42fa2e8eb285b7133fc6191239 (patch) | |
tree | 9e7cff18bee9dcad0635cd018b1c6cc16f948bd6 /src | |
parent | dc3032f675f4e6f56f8512e988ae3b82785ac390 (diff) | |
download | xmlgraphics-fop-d9ccf5f4edf32a42fa2e8eb285b7133fc6191239.tar.gz xmlgraphics-fop-d9ccf5f4edf32a42fa2e8eb285b7133fc6191239.zip |
Fixed a possible NullPointerException: if the citation appears in a fo:marker, the property will only be parsed if the marker is retrieved...
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@672010 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/java/org/apache/fop/fo/flow/AbstractPageNumberCitation.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/java/org/apache/fop/fo/flow/AbstractPageNumberCitation.java b/src/java/org/apache/fop/fo/flow/AbstractPageNumberCitation.java index b45f21348..58c0f4547 100644 --- a/src/java/org/apache/fop/fo/flow/AbstractPageNumberCitation.java +++ b/src/java/org/apache/fop/fo/flow/AbstractPageNumberCitation.java @@ -22,6 +22,7 @@ package org.apache.fop.fo.flow; import java.awt.Color; import org.xml.sax.Locator; +import org.xml.sax.Attributes; import org.apache.fop.apps.FOPException; import org.apache.fop.datatypes.Length; @@ -104,13 +105,18 @@ public abstract class AbstractPageNumberCitation extends FObj { } /** {@inheritDoc} */ - protected void startOfNode() throws FOPException { - super.startOfNode(); - if (refId.equals("")) { + public void processNode(String elementName, Locator locator, Attributes attlist, PropertyList pList) throws FOPException { + super.processNode(elementName, locator, attlist, pList); + if (!inMarker() && (refId == null || "".equals(refId))) { missingPropertyError("ref-id"); } } + /** {@inheritDoc} */ + protected void startOfNode() throws FOPException { + super.startOfNode(); + } + /** * {@inheritDoc} * <br>XSL Content Model: empty |