Repository navigation
Preserve inherited lifecycle method visibility in TestsShouldNotBePublic - #1247
Merged
jkschneider merged 5 commits intoOct 26, 2026
Merged
Conversation
Co-authored-by: Moderne Factory <factory@moderne.io>
Co-authored-by: Moderne Factory <factory@moderne.io>
Protect methods declared by classes with known subclasses. Compare raw fully qualified names so parameterized superclass uses match their declarations. Co-authored-by: Moderne Factory <factory@moderne.io>
Add attributed compiler-backed controls for anonymous and binary-only intermediate subclasses, plus ordinary instantiation. Co-authored-by: Moderne Factory <factory@moderne.io>
Follow attributed superclass chains, including binary-only intermediates, and scan anonymous class bodies. Ordinary constructor calls do not establish inheritance. Co-authored-by: Moderne Factory <factory@moderne.io>
23 of 76 tasks
jkschneider
deleted the
factory/testing1211-c6-inherited-lifecycle-visibility
branch
October 26, 2026 17:26
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.
TestsShouldNotBePublic can make an inherited lifecycle method package-private while keeping its base class public, breaking subclasses in other packages. Preserve method visibility for classes that the attributed source hierarchy shows are extended.
Track raw class names through generic and binary intermediate superclasses, and include anonymous subclasses. Ordinary instantiation remains eligible for the existing visibility cleanup.
Validation:
TestsShouldNotBePublicshould reduce visibility if used elsewhere in Javadoc linksย #458. This fix preserves the inherited-method source exactly; it does not claim a passing complete consumer build for that repository.This is bounded by available attributed ancestry and does not establish inheritance from unknown external consumers.
Fixes item C6 of #1211; the aggregate issue remains open.
Co-authored-by: Moderne Factory factory@moderne.io