[JAVA-3972] Delete BatchCursor.tryNext and AsyncBatchCursor.tryNext methods Created: 27/Jan/21  Updated: 28/Oct/23  Resolved: 15/Jun/21

Status: Closed
Project: Java Driver
Component/s: Internal
Affects Version/s: None
Fix Version/s: 4.3.0

Type: Improvement Priority: Minor - P4
Reporter: Valentin Kavalenka Assignee: Jeffrey Yemin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
split from JAVA-3907 AsyncQueryBatchCursor does not releas... Closed
Backwards Compatibility: Fully Compatible
Documentation Changes: Not Needed

 Description   
  1. com.mongodb.reactivestreams.client.internal.BatchCursor.tryNext and com.mongodb.internal.async.AsyncBatchCursor are internal.
  2. BatchCursor.tryNext is not called.
  3. AsyncBatchCursor.tryNext is called only from
    1. BatchCursor.tryNext, which is not called from anywhere else
    2. implementations of AsyncBatchCursor.tryNext, which are only called from BatchCursor.tryNext, which is not called.

It follows from the above that we can safely delete the aforementioned tryNext methods.



 Comments   
Comment by Githook User [ 15/Jun/21 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Remove unused async cursor tryNext support

Inline method that's now only used in one place.

JAVA-3972
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/3ff3e8a42f15454619f62aaa4bc7230192080248

Comment by Githook User [ 15/Jun/21 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Remove unused async cursor tryNext support

JAVA-3972
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/6fa9a0bee26c3939e628e2c9e645b5f87176a360

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