Rename waitTillFinished to waitTillStarted on NonInterruptiveEvent - #255
Merged
Merged
Conversation
) waitTillFinished() was misleadingly named: it waits for the startUp stage to be finalized, not for the event to finish. Introduce waitTillStarted() as the new name, keeping waitTillFinished() as a deprecated, mutually-forwarding method to preserve source compatibility for existing subclasses of the public NonInterruptiveEvent class. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…arted mutual recursion The two forwarding default methods called each other, which Sonar flags as recursion with no guaranteed termination. Only waitTillStarted() now forwards to waitTillFinished() (needed so the engine, which calls waitTillStarted(), keeps invoking old subclasses overrides of waitTillFinished()). The deprecated waitTillFinished() no longer forwards back, since nothing internal calls it once a subclass overrides waitTillStarted(). Also adds since/forRemoval to the @deprecated annotation per Sonar's code-smell suggestion. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
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.



Summary
waitTillFinished()was misleadingly named; it waits for the startUp stage to be finalized, not for the event to finish.waitTillStarted()as the new name on the publicNonInterruptiveEventclass, and keepswaitTillFinished()as a@Deprecated, mutually-forwarding method so existing subclasses (this is a published v9.0.0 API) keep compiling and working without changes.waitTillFinished()is planned for removal in a future major version.PhasedEventManagerengine, all first-party event implementations/tests, and bothREADME.mdfiles to use the new name.Test plan
mvn -pl phased-testing-core,phased-testing-test-fixtures,phased-testing-testng,mutational-testing -am compile test-compile— clean buildmvn -pl phased-testing-testng test -Dtest=TestPhasedNonInterruptive— passesmvn -pl phased-testing-testng test— 416 tests, 0 failuresmvn -pl mutational-testing test— 27 tests, 0 failureswaitTillFinishedoutside the deprecated shim itself (grep -rn "waitTillFinished")🤖 Generated with Claude Code