Author: jeremias
Date: Tue Jan 22 06:02:27 2008
New Revision: 614201
URL: http://svn.apache.org/viewvc?rev=614201&view=rev
Log:
Bugzilla #44160:
Fixed a possible IndexOutOfBoundsException that could happen with certain
constellations when footnotes are used. Note: I haven't been able to come up
with a scaled-down testcase for regression testing. Maybe someone more intimate
with the footnote handling can.
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java
xmlgraphics/fop/trunk/status.xml
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java?rev=614201&r1=614200&r2=614201&view=diff
==============================================================================
---
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java
(original)
+++
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java
Tue Jan 22 06:02:27 2008
@@ -25,11 +25,11 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+
import org.apache.fop.fo.Constants;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FObj;
import org.apache.fop.layoutmgr.AbstractBreaker.PageBreakPosition;
-
import org.apache.fop.traits.MinOptMax;
class PageBreakingAlgorithm extends BreakingAlgorithm {
@@ -641,10 +641,14 @@
demerits += (footnotesList.size() - 1 - footnoteListIndex)
* deferredFootnoteDemerits;
}
- if (footnoteElementIndex
- < ((LinkedList)
footnotesList.get(footnoteListIndex)).size() - 1) {
- // add demerits for the footnote split between pages
- demerits += splitFootnoteDemerits;
+ if (footnoteListIndex < footnotesList.size()) {
+ if (footnoteElementIndex
+ < ((LinkedList)
footnotesList.get(footnoteListIndex)).size() - 1) {
+ // add demerits for the footnote split between pages
+ demerits += splitFootnoteDemerits;
+ }
+ } else {
+ //TODO Why can this happen in the first place? Does anybody
know? See #44160
}
}
demerits += activeNode.totalDemerits;
Modified: xmlgraphics/fop/trunk/status.xml
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/status.xml?rev=614201&r1=614200&r2=614201&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Tue Jan 22 06:02:27 2008
@@ -28,6 +28,10 @@
<changes>
<release version="FOP Trunk">
+ <action context="Layout" dev="JM" type="fix" fixes-bug="44160">
+ Fixed a possible IndexOutOfBoundsException that could happen with
certain constellations
+ when footnotes are used.
+ </action>
<action context="Layout" dev="JM" type="fix">
Compliance fix: for absolutely positioned block-containers, "top"
wasn't
interpreted correctly.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]