Skip to content

MINOR: Cleanup Raft Module #19284

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 5 commits into from
Apr 2, 2025
Merged

Conversation

sjhajharia
Copy link
Contributor

@sjhajharia sjhajharia commented Mar 25, 2025

Given that now we support Java 17 on our brokers, this PR replace the use of the following in raft module:

  • Collections.singletonList() and Collections.emptyList() with List.of()
  • Collections.singletonMap() and Collections.emptyMap() with Map.of()
  • Collections.singleton() and Collections.emptySet() with Set.of()
  • Arrays.asList() with List.of()

Reviewers: Ken Huang [email protected], Chia-Ping Tsai [email protected]

@github-actions github-actions bot added triage PRs from the community kraft labels Mar 25, 2025
@sjhajharia
Copy link
Contributor Author

Hey @chia7712
Requesting a review when possible.
Thanks a lot!

Copy link
Member

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

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

@sjhajharia thanks for this cleanup. only one comment is left.

@sjhajharia sjhajharia requested a review from chia7712 April 1, 2025 16:32
@github-actions github-actions bot removed the triage PRs from the community label Apr 2, 2025
Copy link
Collaborator

@m1a2st m1a2st 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 this PR, left some comments.

It seems UpdateVoterHandlerState is unused in project, It could be removed.

@sjhajharia
Copy link
Contributor Author

Thanks @m1a2st for the review.
Even I noticed the unused class but was wondering if that should be done in this PR itself or not. I have added it now.

@sjhajharia sjhajharia requested a review from m1a2st April 2, 2025 05:11
@chia7712 chia7712 merged commit 75f384a into apache:trunk Apr 2, 2025
20 checks passed
janchilling pushed a commit to janchilling/kafka that referenced this pull request Apr 4, 2025
Given that now we support Java 17 on our brokers, this PR replace the
use of the following in raft module:

- Collections.singletonList() and Collections.emptyList() with List.of()
- Collections.singletonMap() and Collections.emptyMap() with Map.of()
- Collections.singleton() and Collections.emptySet() with Set.of()
- Arrays.asList() with List.of()

Reviewers: Ken Huang <[email protected]>, Chia-Ping Tsai
<[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants