jeremias 2005/02/23 13:58:17 Modified: src/java/org/apache/fop/layoutmgr BreakPossPosIter.java Log: Avoid IndexOutOfBoundsException when empty list is passed in. Revision Changes Path 1.4 +2 -2 xml-fop/src/java/org/apache/fop/layoutmgr/BreakPossPosIter.java Index: BreakPossPosIter.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/BreakPossPosIter.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- BreakPossPosIter.java 21 Mar 2004 12:03:08 -0000 1.3 +++ BreakPossPosIter.java 23 Feb 2005 21:58:17 -0000 1.4 @@ -1,5 +1,5 @@ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Copyright 1999-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,7 +34,7 @@ * @param endPos ending position */ public BreakPossPosIter(List bpList, int startPos, int endPos) { - super(bpList.listIterator(startPos)); + super((bpList.size() > 0 ? bpList.listIterator(startPos) : bpList.listIterator())); iterCount = endPos - startPos; }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]