Why fail when we can just complain without loss of integrity.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@2056 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2007-02-19 19:47:18 +00:00
parent e37cc33d68
commit 94a32b5103
@@ -236,6 +236,11 @@ public class PersistenceContext
*/
public <T> void cacheStore (CacheKey key, T entry)
{
if (key == null) {
Log.warning("Cache key must not be null [entry=" + entry + "]");
Thread.dumpStack();
return;
}
Log.debug("cacheStore: entry [key=" + key + ", value=" + entry + "]");
// find the old entry, if any
@@ -264,7 +269,12 @@ public class PersistenceContext
*/
public void cacheInvalidate (CacheKey key)
{
cacheInvalidate(key.getCacheId(), key.getCacheKey());
if (key == null) {
Log.warning("Cache key to invalidate must not be null.");
Thread.dumpStack();
} else {
cacheInvalidate(key.getCacheId(), key.getCacheKey());
}
}
/**