keiron 01/09/21 02:08:38 Modified: src/org/apache/fop/fo FONode.java src/org/apache/fop/fo/flow Marker.java Log: gets around a possible npe Revision Changes Path 1.21 +6 -3 xml-fop/src/org/apache/fop/fo/FONode.java Index: FONode.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/FONode.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- FONode.java 2001/08/20 11:19:22 1.20 +++ FONode.java 2001/09/21 09:08:38 1.21 @@ -1,5 +1,5 @@ /* - * $Id: FONode.java,v 1.20 2001/08/20 11:19:22 keiron Exp $ + * $Id: FONode.java,v 1.21 2001/09/21 09:08:38 keiron Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -234,11 +234,14 @@ 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() { 1.6 +4 -3 xml-fop/src/org/apache/fop/fo/flow/Marker.java Index: Marker.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Marker.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Marker.java 2001/08/20 11:19:23 1.5 +++ Marker.java 2001/09/21 09:08:38 1.6 @@ -1,5 +1,5 @@ /* - * $Id: Marker.java,v 1.5 2001/08/20 11:19:23 keiron Exp $ + * $Id: Marker.java,v 1.6 2001/09/21 09:08:38 keiron Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -45,8 +45,9 @@ try { parent.addMarker(this); } catch (FOPException fopex) { - log.error("marker cannot be added to '" + parent - + "'"); + // log is null in constructor + //log.error("marker cannot be added to '" + parent + // + "'"); } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]