fdb-record-layer
fdb-record-layer copied to clipboard
LazyCursor allows onNext when closed
The LazyCursor allows onNext calls when closed and not initialized. For example, this code snippet does not throw an exception:
LazyCursor<> cursor = new LazyCursor(...);
cursor.close();
cursor.onNext().join();
Hi Can I take on this Plan: Add a closed-state guard in LazyCursor.onNext() Ensure it either throws an IllegalStateException or returns a failed future when called after close(). Add a unit test to cover the case (close() → onNext() should fail).