]
Galder Zamarreno reassigned JBCACHE-777:
----------------------------------------
Assignee: Galder Zamarreno (was: Manik Surtani)
FileCacheLoader can return null for get(fqn) breaking the JavaDoc
requirement for CacheLoader.get(fqn)
------------------------------------------------------------------------------------------------------
Key: JBCACHE-777
URL:
http://jira.jboss.com/jira/browse/JBCACHE-777
Project: JBoss Cache
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 1.3.0.SP3, 1.4.0.SP1
Reporter: Galder Zamarreno
Assigned To: Galder Zamarreno
Priority: Minor
FileCacheLoader can return a null value for get(fqn) which goes against the JavaDoc
requirements for that method:
/**
* Returns all keys and values from the persistent store, given a fully qualified
name.
*
* NOTE that the expected return value of this method has changed from JBossCache
1.2.x
* and before! This will affect cache loaders written prior to JBossCache 1.3.0 and
such
* implementations should be checked for compliance with the behaviour expected.
*
* @param name
* @return Map<Object,Object> keys and values for the given node. Returns
* null if the node is not found. If the node is found but has no
* attributes, this method returns an empty Map.
* @throws Exception
*/
If a get(fqn) operation occurrs before a put and the node (directory) does not exist, FCL
returns
null when it should return an empty Map.
If the customer creates a custom cache loader which delegates to a FileCacheLoader, the
following misleading warning message is logged:
10:52:10.839 WARN [MessageListenerThread - Belvedere/Desk/CacheLoaderInterceptor]
CacheLoader.get(Fqn) returned a null; assuming the node nodes not exist.
10:52:10.839 WARN [MessageListenerThread - Belvedere/Desk/CacheLoaderInterceptor] The
CacheLoader interface has changed since JBossCache 1.3.x
10:52:10.839 WARN [MessageListenerThread - Belvedere/Desk/CacheLoaderInterceptor] Please
see
http://jira.jboss.com/jira/browse/JBCACHE-118
10:52:10.849 WARN [MessageListenerThread - Belvedere/Desk/CacheLoaderInterceptor]
CacheLoader.get() should return an empty Map if the node does exist but doesn't have
any attributes.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: