]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
A quick and dirty hack to prevent the IndexOutOfBoundsException
authorSimon Pepping <spepping@apache.org>
Mon, 15 Nov 2004 20:58:20 +0000 (20:58 +0000)
committerSimon Pepping <spepping@apache.org>
Mon, 15 Nov 2004 20:58:20 +0000 (20:58 +0000)
reported in bug 32174.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198146 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/layoutmgr/LineLayoutManager.java

index 0345cae8b981a7c095848ef622f8661a56b4dcd1..925c4c903ee855c77a66d18c9d0f99fa37357d07 100644 (file)
@@ -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());