Skip to content

Make the deprecation of AbstractParser#getBasedir visible to callers - #1082

Merged
slachiewicz merged 1 commit into
masterfrom
deprecate-getbasedir
Aug 17, 2026
Merged

slachiewicz merged 1 commit into
masterfrom
deprecate-getbasedir

Conversation

@slachiewicz

Copy link
Copy Markdown
Member

The javadoc on AbstractParser#getBasedir() has carried an @deprecated tag since DOXIA-373 was raised, but without the annotation no caller ever saw a warning. Anyone subclassing AbstractParser could reach for it and never learn it does not work in multi-module builds.

Adding the annotation is binary-compatible — japicmp passes against the 2.0.0 baseline — so this fits the 2.x line, unlike removing the method.

One judgement call worth your view. This surfaces four warnings inside Doxia itself, all at the MacroRequest construction in the APT, FML, xdoc and XHTML5 parsers. I left them in place rather than adding @SuppressWarnings: there is no replacement for the basedir those parsers need, and silencing the warnings would hide DOXIA-373 in the one codebase that can actually fix it. AptParser already carries a comment saying as much. If you would rather the build stayed quiet, suppressing at those four sites is a one-line change each — say the word.

Verified: mvn clean verify → 667 tests pass, japicmp clean, and the only new warnings are the four expected call sites.

This change was created with AI assistance.

The javadoc has carried an @deprecated tag since DOXIA-373 was raised, but
without the annotation no caller ever saw a warning. Anyone subclassing
AbstractParser could reach for it and never learn it does not work in
multi-module builds.

This surfaces four warnings inside Doxia itself, at the MacroRequest
construction in the APT, FML, xdoc and XHTML5 parsers. They are left in place:
there is no replacement for the basedir the parsers need, and suppressing them
would hide DOXIA-373 in the one codebase able to fix it.

Verified: mvn clean verify -> 667 tests pass, japicmp clean, and the only new
warnings are the four expected call sites
@slachiewicz slachiewicz added maintenance deprecated Pull requests that deprecate features labels Aug 17, 2026
@slachiewicz
slachiewicz merged commit ad680f2 into master Aug 17, 2026
24 of 25 checks passed
@slachiewicz
slachiewicz deleted the deprecate-getbasedir branch August 17, 2026 16:01
@github-actions github-actions Bot added this to the 2.1.1 milestone Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deprecated Pull requests that deprecate features maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant