Skip to content

Fix false CLASS_NOW_NOT_EXTENDABLE for added private constructors - #527

Merged
siom79 merged 1 commit into
siom79:masterfrom
dossett:fix-private-constructor-extendability
Sep 3, 2026
Merged

siom79 merged 1 commit into
siom79:masterfrom
dossett:fix-private-constructor-extendability

Conversation

@dossett

@dossett dossett commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Adding a private constructor to a class whose constructors are already all private does not make that class less extendable. The current comparison includes constructors from both versions, so a constructor absent from the old version is treated like an old non-private constructor and produces a false breaking-change report.

This change evaluates only constructors present in the selected version while preserving final-class and empty-constructor behavior. The regression test covers adding a private overload to a class that already has one private constructor.

Testing:

  • Focused ClassCompatibilityTest: 12 tests passed
  • Complete japicmp module suite: 349 tests passed
  • git diff --check

Fixes #526

@dossett
dossett marked this pull request as draft September 3, 2026 14:48
@dossett
dossett marked this pull request as ready for review September 3, 2026 14:48
@siom79
siom79 merged commit 797cd10 into siom79:master Sep 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

False positive CLASS_NOW_NOT_EXTENDABLE when adding a private constructor

2 participants