Revision: 7850
http://svn.sourceforge.net/foray/?rev=7850&view=rev
Author: victormote
Date: 2006-09-02 10:30:24 -0700 (Sat, 02 Sep 2006)
Log Message:
-----------
Move some data validation code to a more appropriate place.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequenceMaster.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequenceMaster.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequenceMaster.java 2006-09-01 20:19:23 UTC (rev 7849)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequenceMaster.java 2006-09-02 17:30:24 UTC (rev 7850)
@@ -74,6 +74,10 @@
public void end() throws FOTreeException {
/* Validate children. Every child should be a SubSequenceSpecifier. */
+ if (this.children.size() < 1) {
+ this.throwException(getFullName() + "must have at least one "
+ + "sub-sequence specifier.");
+ }
for (int i = 0; i < this.children.size(); i++) {
final Object child = this.children.get(i);
if (!(child instanceof SubSequenceSpecifier)) {
@@ -119,10 +123,6 @@
boolean firstPage = false;
if (currentSubSequence == null) {
currentSubSequence = getNextSubSequence();
- if (currentSubSequence == null) {
- throwException("no subsequences in page-sequence-master '"
- + traitMasterName() + "'");
- }
firstPage = true;
}
String pageMasterName = currentSubSequence.getNextPageMasterName(
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|