We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c3929c1 commit 70b7745Copy full SHA for 70b7745
src/main/java/org/lmdbjava/Cursor.java
@@ -36,7 +36,6 @@ public final class Cursor<T> implements AutoCloseable {
36
private boolean closed;
37
private final Pointer ptrCursor;
38
private Txn<T> txn;
39
- private KeyVal<T> keyVal = new KeyVal<>(null, null);
40
41
Cursor(final Pointer ptr, final Txn<T> txn) {
42
requireNonNull(ptr);
@@ -249,8 +248,7 @@ public T val() {
249
248
* @return the key and value that the cursor is located at.
250
*/
251
public KeyVal<T> keyVal() {
252
- keyVal.wrap(key(), val());
253
- return keyVal;
+ return new KeyVal<>(key(), val());
254
}
255
256
/**
0 commit comments