Repository navigation
Deprecate the parser hooks that will be retyped to SinkEventAttributes - #1094
Merged
Merged
Conversation
…yped Retyping these to SinkEventAttributes is a silent break, not a loud one: an override compiled against the old signature stops overriding and is simply never called again, with nothing failing at build or run time. A deprecation warning now is the only notice a downstream parser author gets before that. Of the five hooks #1074 lists, only consecutiveSections was already marked. Deprecating baseStartTag(String, ...) and baseEndTag(String, ...) also silences the impl.SinkEventAttributeSet warnings inside their bodies, since the JLS does not warn for uses within a deprecated declaration. That drops doxia-core from 84 deprecation warnings to 18; nothing was fixed, the warnings moved out of view. Part of #1074
slachiewicz
marked this pull request as ready for review
September 3, 2026 22:29
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.
Marks the four hooks from #1074 that will be retyped to
SinkEventAttributesin the next major.The point is that the retype is a silent break: an override compiled against the old signature
stops overriding and is simply never called again, with nothing failing at build or run time.
A deprecation warning now is the only notice a downstream parser author gets. Of the five hooks
#1074 lists, only
consecutiveSectionswas already marked.Two things worth a reviewer's attention:
getAttributesFromParseris the weakest of the four. Its problem is only the return type, and allseven call sites use nothing beyond the interface (
getAttribute,addAttribute,removeAttribute), so the eventual retype needs no caller changes at all. Nothing in the repooverrides it either. So this one warns correct code to protect a hypothetical overrider — happy to
drop it from the set if you would rather.
Deprecating
baseStartTag(String, ...)andbaseEndTag(String, ...)also silences thepre-existing
impl.SinkEventAttributeSetwarnings inside their bodies, because the JLS does notwarn for uses within a deprecated declaration. doxia-core goes from 84 deprecation warnings to 18.
Nothing was fixed; the warnings moved out of view. Flagging it so it is not mistaken for progress.
Verified:
mvn verifygreen (japicmp, RAT, checkstyle, all tests);mvn javadoc:javadocgreen with0 errors and no warning on any added block; deprecation-warning counts compared against master
built to the identical reactor point.
Part of #1074
This change was created with AI assistance.