Skip to content

MINOR: cleanup in QuotaFactory #20312

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

Merged
merged 2 commits into from
Aug 6, 2025
Merged

Conversation

DL1231
Copy link
Contributor

@DL1231 DL1231 commented Aug 6, 2025

cleanup in QuotaFactory.

Reviewers: Chia-Ping Tsai chia7712@gmail.com

@github-actions github-actions bot added triage PRs from the community core Kafka Broker small Small PRs labels Aug 6, 2025
public Optional<Plugin<ClientQuotaCallback>> clientQuotaCallbackPlugin() {
return clientQuotaCallbackPlugin;
}
public record QuotaManagers(ClientQuotaManager fetch,
Copy link
Member

Choose a reason for hiding this comment

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

I prefer not to use record, as mutable fields can lead to undefined behavior in equals and hashCode

Copy link
Member

Choose a reason for hiding this comment

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

However, the rule seems hard to enforce, as there are existing record classes in the codebase that violate immutability

@chia7712 chia7712 merged commit 71442bf into apache:trunk Aug 6, 2025
23 checks passed
@github-actions github-actions bot removed the triage PRs from the community label Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-approved core Kafka Broker small Small PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants