Repository navigation
FOP-3349: A line that overflows on the float re-layout pass is reported, not a NullPointerException - #121
Open
plutext wants to merge 1 commit into
Open
FOP-3349: A line that overflows on the float re-layout pass is reported, not a NullPointerException#121plutext wants to merge 1 commit into
plutext wants to merge 1 commit into
Conversation
…ed, not a NullPointerException LineLayoutManager.LineBreakingAlgorithm.updateData2 reported an overflowing line through curChildLM.getFObj(). On the float re-layout pass (PageBreaker.handleFloatLayout) curChildLM is null, so a line overflowing beside a float wider than the measure threw a NullPointerException and the document failed. It is now reported against the line manager's own FO, as it already was when the child had no FO. The code only reports; layout does not change. Test: float_overflow_relayout.xml, which threw the NullPointerException 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-3349.
LineLayoutManager.LineBreakingAlgorithm.updateData2reports a line that does not fit throughcurChildLM:On the float re-layout pass (
PageBreaker.handleFloatLayout),curChildLMis null. A line that overflows there,beside a float wider than the measure, threw a
NullPointerException, and the document failed instead of theoverflow being reported.
The change. Test
curChildLM == nullas well asgetFObj() == null, so the overflow is reported against theline manager's own FO, as it already is when the child has no FO. The code only reports; layout does not change.
Test.
float_overflow_relayout.xml: a 480pt float in a 425pt region, then a block with an overflowing word.It throws the
NullPointerExceptionwithout the change. With it, the fop-core suite passes, 3662 tests and 0failures, and checkstyle reports 0 violations.
🤖 Generated with Claude Code