Skip to content

KAFKA-8035: Add lambda and anonymous class tests for KStream API generics#22574

Open
Dpk376 wants to merge 1 commit into
apache:trunkfrom
Dpk376:KAFKA-8035-add-generics-lambda-tests-kstream-api
Open

KAFKA-8035: Add lambda and anonymous class tests for KStream API generics#22574
Dpk376 wants to merge 1 commit into
apache:trunkfrom
Dpk376:KAFKA-8035-add-generics-lambda-tests-kstream-api

Conversation

@Dpk376

@Dpk376 Dpk376 commented Jun 15, 2026

Copy link
Copy Markdown

This PR adds compile-time regression tests for KStream API generic bounds (KAFKA-8035).

Each KStream method is tested with both a lambda expression and an anonymous class implementation. If the generic bounds on any method were incorrect, the Java compiler would reject the lambda form — so these tests act as regression guards for future API changes.

Methods covered: filter, filterNot, selectKey, map, mapValues (ValueMapper + ValueMapperWithKey), flatMap, flatMapValues (ValueMapper + ValueMapperWithKey), foreach, peek, merge, method references.

26 tests, all passing.

JIRA: https://issues.apache.org/jira/browse/KAFKA-8035

@github-actions github-actions Bot added triage PRs from the community streams tests Test fixes (including flaky tests) labels Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

streams tests Test fixes (including flaky tests) triage PRs from the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant