Skip to content

Fix redundant JUnit TestCase constructors and their callers across source files. - #1144

Open
motlin wants to merge 1 commit into
openrewrite:mainfrom
motlin:fix-1107-junit-constructor-callers
Open

motlin wants to merge 1 commit into
openrewrite:mainfrom
motlin:fix-1107-junit-constructor-callers

Conversation

@motlin

@motlin motlin commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

What's changed?

MigrateJUnitTestCase now scans constructor declarations and references before removing redundant TestCase(String) constructors. Calls such as new MathTest("FOO") become new MathTest(), including callers in other source files. The change also follows redundant superclass constructor chains and updates super(...) and this(...) calls.

What's your motivation?

Anything in particular you'd like reviewers to focus on?

@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite Oct 1, 2026
@motlin
motlin force-pushed the fix-1107-junit-constructor-callers branch 2 times, most recently from 9fe0d78 to 93096ca Compare October 5, 2026 21:53
@motlin
motlin force-pushed the fix-1107-junit-constructor-callers branch from 93096ca to 49d176f Compare October 17, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

MigrateJUnitTestCase removes the TestCase(String) constructor without updating its callers, breaking compilation

1 participant