Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

NPE in Reservoir.get(...) method. #10

Closed
makovkastar opened this issue Aug 29, 2014 · 3 comments
Closed

NPE in Reservoir.get(...) method. #10

makovkastar opened this issue Aug 29, 2014 · 3 comments

Comments

@makovkastar
Copy link

Hello! I've got a strange NPE in Reservoir.get() method:

java.lang.NullPointerException
at com.anupcowkur.reservoir.Reservoir.get(Reservoir.java:75)
...

How is it possible if I always check a key and a value for null before saving in the Reservoir?

@anupcowkur
Copy link
Owner

Hi. Are you sure the key and value exist?

@makovkastar
Copy link
Author

Sorry, it seems I set not large enough cache size. I checked if a value exists, then put some new values and tried to retrieve values that I previously checked for existence. But they were already deleted to release space for new values.

@anupcowkur
Copy link
Owner

Ah ok. Nothing wrong with the library then. I'll close this issue.

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

No branches or pull requests

2 participants