Skip to content

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
xuhongjia pushed a commit to Deckers-Ohana/eventmesh that referenced this pull request Mar 13, 2025
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