Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

[#28] refactor to reduce code repetition #29

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

gaohoward
Copy link
Contributor

@gaohoward gaohoward commented Nov 6, 2024

Currently in ArtemisJolokia code there are many common codes among
fetching methods for different components. For example
readBrokerAttributes, readAddressAttributes and
readClusterConnectionAttributes are all sending 'POST' requests
with similar pattern but only different parameters.

It can be abstracted to a common method shared by those methods
and also will be reused when we add new components like Bridges.

@gaohoward gaohoward linked an issue Nov 6, 2024 that may be closed by this pull request
@lavocatt
Copy link
Collaborator

Can you add more context to the PR and the commit please?

@gaohoward
Copy link
Contributor Author

Can you add more context to the PR and the commit please?

Sure will do. Thanks!

Currently in ArtemisJolokia code there are many common codes among
fetching methods for different components. For example
readBrokerAttributes, readAddressAttributes and
readClusterConnectionAttributes are all sending 'POST' requests
with similar pattern but only different parameters.

It can be abstracted to a common method shared by those methods
and also will be reused when we add new components like Bridges.
Copy link
Contributor

@Msarawan Msarawan left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Collaborator

@lavocatt lavocatt left a comment

Choose a reason for hiding this comment

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

Thanks for having added the context to the PR.

@lavocatt lavocatt merged commit f65dc48 into artemiscloud:main Nov 27, 2024
7 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

refactor to reduce code repetition
4 participants