[KAFKA-383] cursor.tryNext NPE reported Created: 28/Jul/23  Updated: 28/Oct/23  Resolved: 10/Aug/23

Status: Closed
Project: Kafka Connector
Component/s: None
Affects Version/s: 1.10.1
Fix Version/s: 1.11.0

Type: Bug Priority: Major - P3
Reporter: Ross Lawley Assignee: Ross Lawley
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Documentation Changes: Not Needed

 Description   

A user has reported seeing a NPE due to cursor being null.

I noticed that tryCreateCursor can return null so it should be marked as @Nullable. And calls using the cursor need to ensure the cursor exists.

See: Community Forum Post



 Comments   
Comment by Githook User [ 10/Aug/23 ]

Author:

{'name': 'Ross Lawley', 'email': 'ross@mongodb.com', 'username': 'rozza'}

Message: Mark the cursor as nullable (#143)

Prevent NPE if the cursor cannot be recreated

KAFKA-383
Branch: master
https://github.com/mongodb/mongo-kafka/commit/c6397c0fd3124c4d3ad5019afe1ee95df81a0cc2

Generated at Thu Feb 08 09:06:15 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.