[infinispan-issues] [JBoss JIRA] (ISPN-5697) KeyValueFilter.accept() used in AdvancedCache.filterEntries(..) gets 'null' as value param when traversing cache store entries

Carsten Lohmann (JIRA) issues at jboss.org
Tue Aug 25 02:17:26 EDT 2015


Carsten Lohmann created ISPN-5697:
-------------------------------------

             Summary: 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.




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the infinispan-issues mailing list