Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect behavior of MutableLHashSeparateKVLongObjMapGO cursor #69

Open
marespane opened this issue Aug 22, 2019 · 0 comments
Open

Incorrect behavior of MutableLHashSeparateKVLongObjMapGO cursor #69

marespane opened this issue Aug 22, 2019 · 0 comments

Comments

@marespane
Copy link

marespane commented Aug 22, 2019

Hello @leventov ,

Found an issue when using the cursor to modify the MutableLHashSeparateKVLongObjMapGO map. The following snippet can be used to replicate the issue:

`HashLongObjMap map = HashLongObjMaps.newMutableMap();
map.put(108, "null");
map.put(117, "null");
map.put(116, "null");
map.put(146, "null");
map.put(131, "null");
map.put(111, "null");
map.put(113, "null");
map.put(173, "null");
map.put(107, "null");
map.put(110, "null");
map.put(118, "null");
map.put(109, "null");
map.put(114, "null");
map.put(185, "null");
map.put(112, "null");
map.put(177, "null");
map.put(135, "null");
map.put(115, "null");
map.put(186, "null");
LongObjCursor cursor = map.cursor();

    while (cursor.moveNext()) {
        long key = cursor.key();
        if (key == 177 || key == 186 || key == 185 || key == 173) {
            cursor.remove();
        } else {
            cursor.setValue(String.valueOf(key));
        }
    }

    System.out.println(map);`

The output is that key 109 has value "null" instead of "109".

The version used is koloboke-impl-jdk8-1.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant