Skip to content

Make generate(Sink, Locale) abstract again - #96

Merged
slachiewicz merged 1 commit into
masterfrom
agent/generate-no-recursion
Oct 18, 2026
Merged

slachiewicz merged 1 commit into
masterfrom
agent/generate-no-recursion

Conversation

@slachiewicz

Copy link
Copy Markdown
Member

Fixes #91. With both generate methods as defaults that call each other, a report that implements neither compiles and fails with StackOverflowError at runtime. generate(Sink, Locale) is abstract and undeprecated again, as in 4.0.0. generate(Sink, SinkFactory, Locale) stays a default that calls it, so a caller such as maven-site-plugin can use the multi-page method on every report, and multi-page reports override it.

This is an alternative to #94, which keeps both defaults and checks at runtime.

@slachiewicz slachiewicz added the bug Something isn't working label Oct 11, 2026
With both generate methods as defaults that call each other, a report
that implements neither compiles and fails with StackOverflowError at
runtime (#91). generate(Sink, Locale) is abstract, as in 4.0.0, and
generate(Sink, SinkFactory, Locale) stays a default that calls it, so
callers can use the multi-page method on every report.
@slachiewicz
slachiewicz force-pushed the agent/generate-no-recursion branch from 053e9c0 to c8dd302 Compare October 18, 2026 17:16
@slachiewicz
slachiewicz marked this pull request as ready for review October 18, 2026 17:16
@slachiewicz
slachiewicz merged commit 7964c58 into master Oct 18, 2026
22 checks passed
@slachiewicz
slachiewicz deleted the agent/generate-no-recursion branch October 18, 2026 17:42
@github-actions github-actions Bot added this to the 4.1.0 milestone Oct 18, 2026
@slachiewicz slachiewicz removed this from the 4.1.0 milestone Oct 26, 2026
@slachiewicz slachiewicz added the skip-changelog Skip this PR from automatically changelog generation label Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working skip-changelog Skip this PR from automatically changelog generation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

High: mutual recursion between default generate() overloads causes StackOverflowError

1 participant