-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Introduce feature flag for auto-closing AutoCloseable
in Jupiter's ExtensionContext.Store
#4442
Conversation
- Suppress deprecation warnings for `CloseableResource` usage - Ensure proper handling of `InterruptedException` in resource closing - Refactor code to avoid deprecated API usage where possible
Do you think we should add a test case for this scenario? 🤔 Also, I'm wondering whether the purpose of this PR is solely to add configuration parameter or if it should implement methods to handle |
junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ExtensionContext.java
Outdated
Show resolved
Hide resolved
*/ | ||
void close() throws Throwable; | ||
void close() throws Exception; |
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.
Changing this would be binary-incompatible. Thus, I don't think we can have CloseableResource
extend AutoCloseable
after all. I guess we could support both CloseableResource
and AutoCloseable
instead as separate interfaces. I'll discuss this with the team.
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 agree with you.
Please discuss this with the team and share the outcome! 👍🏻
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.
@YongGoose We've updated the issue description in #4434.
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.
Got it!
I will close this PR, start a new task, and then create a new PR.
Also, if you have some time, could you briefly explain how the discussion went on the issue below? 🙂
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.
Also, if you have some time, could you briefly explain how the discussion went on the issue below? 🙂
I just posted an update: #1767 (comment)
…n/ExtensionContext.java Co-authored-by: Marc Philipp <[email protected]>
Overview
fix #4434
I hereby agree to the terms of the JUnit Contributor License Agreement.
Definition of Done
@API
annotations