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

AssertionError when replacing missing key #244

Closed
fvlad opened this issue May 18, 2019 · 0 comments
Closed

AssertionError when replacing missing key #244

fvlad opened this issue May 18, 2019 · 0 comments

Comments

@fvlad
Copy link

fvlad commented May 18, 2019

Hi. I'm using jctools 2.1.2.
I found that when I try to replace a value in NBHM for a key that doesn't exit, I get AssertionError. Here is the sample test:

@Test
public void replaceTest() {
    final ConcurrentMap<String, String> map = new NonBlockingHashMap<>();

    assertNull(map.replace(UUID.randomUUID().toString(), UUID.randomUUID().toString()));
    assertFalse(map.replace(UUID.randomUUID().toString(), UUID.randomUUID().toString(), UUID.randomUUID().toString()));
}

The test works fine when I replace NBHM with ConcurrentHashMap.

@fvlad fvlad changed the title AssertionError when replacing missing value AssertionError when replacing missing key May 18, 2019
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