kafka
kafka copied to clipboard
KAFKA-17686: AsyncKafkaConsumer.offsetsForTimes() fails with NullPointerException
The code to convert the Map
was initially expressed using the Streams API with collect(Collectors.toMap())
. Unfortunately, the implementation of Collector
returned by Collectors.toMap()
does not support null
entries. The KafkaConsumer.offsetsForTimes()
API explicitly states that null
s can be present in the returned Map
, hence this change.
Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)