kafka icon indicating copy to clipboard operation
kafka copied to clipboard

KAFKA-17686: AsyncKafkaConsumer.offsetsForTimes() fails with NullPointerException

Open kirktrue opened this issue 4 months ago • 4 comments

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 nulls 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)

kirktrue avatar Oct 03 '24 00:10 kirktrue