aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/fo/FONode.java
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2001-09-21 09:08:38 +0000
committerKeiron Liddle <keiron@apache.org>2001-09-21 09:08:38 +0000
commit961717f2193dfb190b43d63594704a4994f14d22 (patch)
tree5894f0ab1c8b031d08b77b842cd22c2098041e1c /src/org/apache/fop/fo/FONode.java
parent924dd8ccef0c291cb9d9234e7a43ff44f73309a7 (diff)
downloadxmlgraphics-fop-961717f2193dfb190b43d63594704a4994f14d22.tar.gz
xmlgraphics-fop-961717f2193dfb190b43d63594704a4994f14d22.zip
gets around a possible npe
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194473 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/fo/FONode.java')
-rw-r--r--src/org/apache/fop/fo/FONode.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/org/apache/fop/fo/FONode.java b/src/org/apache/fop/fo/FONode.java
index a620eb235..af4791a40 100644
--- a/src/org/apache/fop/fo/FONode.java
+++ b/src/org/apache/fop/fo/FONode.java
@@ -234,11 +234,14 @@ abstract public class FONode {
public void addMarker(Marker marker) throws FOPException {
String mcname = marker.getMarkerClassName();
- if (!markers.containsKey(mcname) && children.isEmpty())
+ if (!markers.containsKey(mcname) && children.isEmpty()) {
markers.put(mcname, marker);
- else
+ } else {
+ log.error("fo:marker must be an initial child,"
+ + "and 'marker-class-name' must be unique for same parent");
throw new FOPException("fo:marker must be an initial child,"
+ "and 'marker-class-name' must be unique for same parent");
+ }
}
public boolean hasMarkers() {