DATACOUCH-53 - protection against NPE on CouchbaseCache when putting null as a value
This commit is contained in:
committed by
Michael Nitschinger
parent
7d79d79e28
commit
b11fc6c53c
@@ -88,8 +88,12 @@ public class CouchbaseCache implements Cache {
|
||||
* @param value the Object to store.
|
||||
*/
|
||||
public final void put(final Object key, final Object value) {
|
||||
String documentId = key.toString();
|
||||
client.set(documentId, 0, value);
|
||||
if (value != null) {
|
||||
String documentId = key.toString();
|
||||
client.set(documentId, 0, value);
|
||||
} else {
|
||||
evict(key);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user