diff options
author | Jeremias Maerki <jeremias@apache.org> | 2005-02-23 21:58:17 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2005-02-23 21:58:17 +0000 |
commit | ce6b0bd2e4f97178ea4f3677daa565d4ae12d8a3 (patch) | |
tree | f2c72e13fcba08871a2b80628f55de749dbc4230 /src | |
parent | 982cb1e1b2b29bd3ac3853c7bff2acb2f55dcf15 (diff) | |
download | xmlgraphics-fop-ce6b0bd2e4f97178ea4f3677daa565d4ae12d8a3.tar.gz xmlgraphics-fop-ce6b0bd2e4f97178ea4f3677daa565d4ae12d8a3.zip |
Avoid IndexOutOfBoundsException when empty list is passed in.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198456 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/java/org/apache/fop/layoutmgr/BreakPossPosIter.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/BreakPossPosIter.java b/src/java/org/apache/fop/layoutmgr/BreakPossPosIter.java index 40a1a4aae..5f37ee92c 100644 --- a/src/java/org/apache/fop/layoutmgr/BreakPossPosIter.java +++ b/src/java/org/apache/fop/layoutmgr/BreakPossPosIter.java @@ -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 @@ public class BreakPossPosIter extends PositionIterator { * @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; } |