-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Issues/2914 private lifecycle methods should cause exception #2951
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues/2914 private lifecycle methods should cause exception #2951
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private
lifecycle methods now cause an exception similar to the behavior forstatic
methods.
Implementation and tests look good.
(Not yet completely sure how to precisely define 'our' meaning of overridden/shadowed in this context.)
I'll ponder it a bit and get back to you if I come up with something.
Using a thesaurus I came up with the following candidates.
|
Personally, I would prefer 'superseded'. To me, it conveys best what is going on without using the s-word. |
junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/LifecycleMethodShadowingTests.java
Outdated
Show resolved
Hide resolved
I think 'superseded' is a good choice. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the PR to enforce that @BeforeAll
and @AfterAll
lifecycle methods are not allowed to be private
as well.
…fix formatting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I raised a question about superseded interface methods.
junit-jupiter-api/src/main/java/org/junit/jupiter/api/AfterAll.java
Outdated
Show resolved
Hide resolved
junit-jupiter-api/src/main/java/org/junit/jupiter/api/BeforeAll.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good!
All that's left is the following bullet point.
- Change is documented in the User Guide and Release Notes
Yes, should be included in the release notes. |
I apologize for prematurely removing the "breaking changes" section for Jupiter in the 5.9 RC1 release notes, but that's where I'd put the note. That's what we've done in the past, along the lines of "Fixed bug XYZ, though this is potentially a breaking change for some users in that the build will now fail..."
I meant more along the lines of updating the wording currently in use. For example, for
Specifically, we need to update the following sections. |
Overview
private
lifecycle methods now cause an exception similar to the behavior forstatic
methods.(Not yet completely sure how to precisely define 'our' meaning of overridden/shadowed in this context.)
I hereby agree to the terms of the JUnit Contributor License Agreement.
Definition of Done
@API
annotations