]
Carsten Lohmann commented on ISPN-5697:
---------------------------------------
Workaround:
Using a filter that implements {{KeyValueFilterConverter}} (and using no converter or
using the same KeyValueFilterConverter object as converter).
KeyValueFilter.accept() used in AdvancedCache.filterEntries(..) gets
'null' as value param when traversing cache store entries
------------------------------------------------------------------------------------------------------------------------------
Key: ISPN-5697
URL:
https://issues.jboss.org/browse/ISPN-5697
Project: Infinispan
Issue Type: Bug
Components: Core
Affects Versions: 7.2.4.Final
Reporter: Carsten Lohmann
When using {{AdvancedCache.filterEntries(filter)}} on a cache with a cache loader (where
not all entries are in memory),
the {{accept(key, value, metadata)}} method of the given KeyValueFilter is invoked with
{{null}} as value parameter for the cache loader entries.
But the javadoc of {{filterEntries}} states:
{quote}
Callbacks to the filter will never provide a key or value that will be null.
{quote}
In the code:
In the "{{if (shouldUseLoader(flags)}} \[..\]" block of
{{LocalEntryRetriever#retrieveEntries}} the given filter is wrapped as a
{{KeyValueFilterAsKeyFilter}} causing {{null}} to be used as value.