From: Simon Pepping Date: Mon, 15 Nov 2004 20:58:20 +0000 (+0000) Subject: A quick and dirty hack to prevent the IndexOutOfBoundsException X-Git-Tag: Root_Temp_KnuthStylePageBreaking~361 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1a3aeca8bb4b059e7827f9eac0adf12985b13471;p=xmlgraphics-fop.git A quick and dirty hack to prevent the IndexOutOfBoundsException reported in bug 32174. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198146 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java b/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java index 0345cae8b..925c4c903 100644 --- a/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java @@ -480,6 +480,12 @@ public class LineLayoutManager extends InlineStackingLayoutManager { } knuthPar.endParagraph(); + // emergency patch + if (knuthParagraphs.size() == 0) { + setFinished(true); + return null; + } + // find the optimal line breaking points for each paragraph ListIterator paragraphsIterator = knuthParagraphs.listIterator(knuthParagraphs.size());