Skip to content

MINOR: Replace Collections factory methods with Java 11+ equivalents in group-coordinator and part of clients#21876

Merged
chia7712 merged 2 commits intoapache:trunkfrom
see-quick:MINOR-refactor-from-jdk8-to-jdk11-part3
Mar 30, 2026
Merged

MINOR: Replace Collections factory methods with Java 11+ equivalents in group-coordinator and part of clients#21876
chia7712 merged 2 commits intoapache:trunkfrom
see-quick:MINOR-refactor-from-jdk8-to-jdk11-part3

Conversation

@see-quick
Copy link
Copy Markdown
Contributor

@see-quick see-quick commented Mar 26, 2026

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 asList.of(...)would break the code. Moreover inAssignorHelpersthere isCollections.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

…in group-coordinator and part of clients

Signed-off-by: see-quick <maros.orsak159@gmail.com>
Signed-off-by: see-quick <maros.orsak159@gmail.com>
@github-actions github-actions bot removed the triage PRs from the community label Mar 28, 2026
@chia7712 chia7712 merged commit 5eff4ce into apache:trunk Mar 30, 2026
26 checks passed
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>
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.

4 participants