MINOR: Replace Collections factory methods with Java 11+ equivalents in group-coordinator and part of clients#21876
Merged
chia7712 merged 2 commits intoapache:trunkfrom Mar 30, 2026
Conversation
…in group-coordinator and part of clients Signed-off-by: see-quick <maros.orsak159@gmail.com>
FrankYang0529
approved these changes
Mar 27, 2026
m1a2st
approved these changes
Mar 27, 2026
chia7712
approved these changes
Mar 30, 2026
Shekharrajak
pushed a commit
to Shekharrajak/kafka
that referenced
this pull request
Mar 31, 2026
…in group-coordinator and part of clients (apache#21876) This PR is another one with changing old JDK 8 API to JDK 11. It's changing in the whole `group-coordinator` module and part of clients (i.e., common/requests, common/errors, common/config). I didn't want to do the whole... because it would be more bigger change ... Also I have faced the issue where in `GroupCoordinatorService we use `Collections.singletonList(null)` so I skipped that as `List.of(...)` would break the code. Moreover in `AssignorHelpers` there is `Collections.emptyMap().getClass()` which is using reflection and that I would also use different class ... Reviewers: Ken Huang <s7133700@gmail.com>, PoAn Yang <payang@apache.org>, Chia-Ping Tsai <chia7712@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is another one with changing old JDK 8 API to JDK 11. It's
changing in the whole
group-coordinatormodule and part of clients(i.e., common/requests, common/errors, common/config). I didn't want to
do the whole... because it would be more bigger change ...
Also I have faced the issue where in
GroupCoordinatorService we useCollections.singletonList(null)so I skipped that asList.of(...)would break the code. Moreover inAssignorHelpersthere isCollections.emptyMap().getClass()` which is using reflection and that Iwould also use different class ...
Reviewers: Ken Huang s7133700@gmail.com, PoAn Yang
payang@apache.org, Chia-Ping Tsai chia7712@gmail.com