[jboss-jira] [JBoss JIRA] Created: (JBCACHE-777) FileCacheLoader can return null for get(fqn) breaking the JavaDoc requirement for CacheLoader.get(fqn)
Galder Zamarreno (JIRA)
jira-events at jboss.com
Fri Sep 22 09:42:01 EDT 2006
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.4.0.SP1, 1.3.0.SP3
Reporter: Galder Zamarreno
Assigned To: Manik Surtani
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: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list