Repository navigation
Conversation
…table, not NoSuchElementException When a side float outlasts the paragraph it is anchored in and the content beside it continues into a table, the float's end falls between two rows. PageBreaker.handleFloatLayout then reads the element list again from that break, and TableLayoutManager cannot be restarted (isRestartable() is false): the table's child iterator, already exhausted, threw NoSuchElementException in LMiter.next and the document failed. PageBreakingAlgorithm.considerLegalBreak no longer takes a break between two boxes of the same non-restartable layout manager as the float's edge; the edge waits for the first legal break after it. The rows below the float keep the table's width, which the table set once for all its rows, so nothing is drawn differently from a re-layout at the row, and the block after the table is laid out at full width. Test: float_edge-inside-table.xml, which threw NoSuchElementException before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes FOP-3354.
When a side float outlasts the paragraph it is anchored in and the content beside it continues into a table,
the float's end falls between two rows.
PageBreaker.handleFloatLayoutthen reads the element list again fromthat break, and
TableLayoutManagercannot be restarted (isRestartable()is false): the table's childiterator, already exhausted, threw
NoSuchElementExceptioninLMiter.next, and the document failed.The change.
PageBreakingAlgorithm.considerLegalBreakno longer takes a break between two boxes of the samenon-restartable layout manager as the float's edge; the edge waits for the first legal break after it. The rows
below the float keep the table's width, which the table set once for all its rows, so nothing is drawn
differently from a re-layout at the row, and the block after the table is laid out at full width.
Test.
float_edge-inside-table.xml: a 40pt float in a 14pt heading with a 10pt space after it, then afive-row table. It throws without the change. With it, the fop-core suite passes, 3679 tests and 0 failures, and
checkstyle reports 0 violations.
🤖 Generated with Claude Code