[infinispan-issues] [JBoss JIRA] (ISPN-4506) Fix types on AdvancedCacheLoader to be friendlier for loader implementors
William Burns (JIRA)
issues at jboss.org
Fri Jul 11 08:21:26 EDT 2014
[ https://issues.jboss.org/browse/ISPN-4506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
William Burns reassigned ISPN-4506:
-----------------------------------
Assignee: William Burns (was: Mircea Markus)
> Fix types on AdvancedCacheLoader to be friendlier for loader implementors
> -------------------------------------------------------------------------
>
> Key: ISPN-4506
> URL: https://issues.jboss.org/browse/ISPN-4506
> Project: Infinispan
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: William Burns
> Assignee: William Burns
>
> Currently AdvancedCacheLoader has the following method
> {code}
> void process(KeyFilter<? super K> filter, CacheLoaderTask<? super K, ? super V> task, Executor executor, boolean fetchValue, boolean fetchMetadata);
> {code}
> The issue is that the CacheLoaderTask doesn't use the lower bound wildcard types directly. Instead it has an argument of MarshalledEntry<K, V> which means the lower bounds are applied to this Entry. Unfortunately the JVM compiler cannot do lower bounds properly on a nested type like this so it can cause issues when passing this as an argument.
> Instead we should change the process method to have strong types for the CacheLoaderTask which would allow for implementors to easily implement this. This does lose the ability to pass super types for the CacheLoaderTask types, however this is unlikely to be used often and can easily be worked around while maintaining type safety. On the inverse the implementors of AdvancedCacheLoader have to resort to raw types to get it to compile.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
More information about the infinispan-issues
mailing list