Skip to content
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

[ISSUE #3010] Method manually handles closing an auto-closeable resource [MetaHandler] #4755

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

arsenalzp
Copy link
Contributor

Fixes #3010.

Motivation

This change implements try-with-resources feature for get() method in MetaHandler class.
The try-with-resources statement ensures that each resource is closed at the end of the statement.

Modifications

Rewrite get() method to use try-with-resource statement, remove finally block.

Documentation

  • Does this pull request introduce a new feature? (no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
  • If a feature is not applicable for documentation, explain why?
  • If a feature is not documented yet in this PR, please create a followup issue for adding the documentation

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to the Apache EventMesh community!!
This is your first PR in our project. We're very excited to have you onboard contributing. Your contributions are greatly appreciated!

Please make sure that the changes are covered by tests.
We will be here shortly.
Let us know if you need any help!

Want to get closer to the community?

WeChat Assistant WeChat Public Account Slack
Join Slack Chat

Mailing Lists:

Name Description Subscribe Unsubscribe Archive
Users User support and questions mailing list Subscribe Unsubscribe Mail Archives
Development Development related discussions Subscribe Unsubscribe Mail Archives
Commits All commits to repositories Subscribe Unsubscribe Mail Archives
Issues Issues or PRs comments and reviews Subscribe Unsubscribe Mail Archives

@arsenalzp arsenalzp force-pushed the refactorMetaHandler branch from b66b310 to 15699bc Compare January 21, 2024 13:39
Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com>

rewrite try-with-resources to use single object

Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com>

trim comments

Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com>
@arsenalzp arsenalzp force-pushed the refactorMetaHandler branch from 15699bc to 8020e99 Compare January 25, 2024 16:51
Copy link
Member

@mxsm mxsm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mxsm mxsm merged commit 378aa75 into apache:master Jan 26, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement] Method manually handles closing an auto-closeable resource [MetaHandler]
3 participants