Skip to content
This repository has been archived by the owner on Feb 9, 2019. It is now read-only.

Redis Plugin: NullpointerException when setting null #175

Open
ide-an opened this issue Sep 19, 2016 · 1 comment
Open

Redis Plugin: NullpointerException when setting null #175

ide-an opened this issue Sep 19, 2016 · 1 comment

Comments

@ide-an
Copy link

ide-an commented Sep 19, 2016

I'm trying to use Redis Plugin with my Play 2.4 Java application.
When I set null value to Redis through Cache API, I get NullPointerException at

throw new IOException("could not serialize: " + value.toString)
.
Redis Plugin supports String and Serializable, so there is a possibility of accepting null value as set parameter.


pac4j/play-pac4j#90 also refers to this problem.

@resamsel
Copy link

Is this going to be addressed? It is quite a pain to check for nulls or NPEs when offering REDIS cache support.

The solution to this issue could be as simple as using String.valueOf(value) instead of value.toString, right? I'm in no way an expert, but this should be similar in Scala.

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