Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 70b7745

Browse filesBrowse files
committed
always return new KeyVal from cursor
1 parent c3929c1 commit 70b7745
Copy full SHA for 70b7745

1 file changed

+1-3Lines changed: 1 addition & 3 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/main/java/org/lmdbjava/Cursor.java‎

Copy file name to clipboardExpand all lines: src/main/java/org/lmdbjava/Cursor.java
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ public final class Cursor<T> implements AutoCloseable {
3636
private boolean closed;
3737
private final Pointer ptrCursor;
3838
private Txn<T> txn;
39-
private KeyVal<T> keyVal = new KeyVal<>(null, null);
4039

4140
Cursor(final Pointer ptr, final Txn<T> txn) {
4241
requireNonNull(ptr);
@@ -249,8 +248,7 @@ public T val() {
249248
* @return the key and value that the cursor is located at.
250249
*/
251250
public KeyVal<T> keyVal() {
252-
keyVal.wrap(key(), val());
253-
return keyVal;
251+
return new KeyVal<>(key(), val());
254252
}
255253

256254
/**

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.