Visitar URL original
Preserve published public and protected class modifiers by jkschneider · Pull Request #1241 · openrewrite/rewrite-static-analysis · GitHub
Skip to content

Preserve published public and protected class modifiers - #1241

Merged
jkschneider merged 2 commits into
mainfrom
fix/public-class-final-api-inherited
Nov 6, 2026
Merged

jkschneider merged 2 commits into
mainfrom
fix/public-class-final-api-inherited

Conversation

@jkschneider

@jkschneider jkschneider commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

FinalClass made jsoup's public Range, Position and AttributeRange final, failing three entries in its previously green japicmp check. Preserve public/protected class modifiers, including implicitly public interface members and public nested types inherited through an accessible subclass. Eligible package/private implementation declarations still become final.

The source regression reproduces the actual Range API shape before the fix. An additional failing-first inherited nested type regression exercises the conservative visibility helper shared with the constructor fix. Original private constructors do not imply published class modifiers can be changed automatically; no claim of baseline external Java subclassing is made.

All16 FinalClass tests pass, plus11 constructor and5 composite tests. Positive package/private controls remain eligible. This PR is stacked on #1240 only for its shared helper, with one issue commit here. Replaces unmerged #1239 without rewriting its source branch. Fresh exact-head CI and actual original jsoup model private composite replay + exact compile/full check are being collected. No whole recipe disabling, consumer edits, compatibility check suppression or build flag changes.

Fresh hosted proof: original jsoup commit/LST and12 model-file hashes match the failed final run. Whole1 private CommonStaticAnalysis run 20261106140657-9ui4B finished148files/0errors. Exact compile/full check PASS japicmp +2648unit +55integration =2703tests/0failures/0errors/0skips. Postbuild source tree equals exact hosted patch output. Positive private Attributes.Dataset still finalizes. Parent owns final combined wide/all4 verification and review/merge.

@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite Nov 6, 2026
Base automatically changed from fix/abstract-constructor-api-inherited to main November 6, 2026 14:13
@jkschneider
jkschneider merged commit 56d7e64 into main Nov 6, 2026
1 check passed
@jkschneider
jkschneider deleted the fix/public-class-final-api-inherited branch November 6, 2026 14:17
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant