scijava-common
scijava-common copied to clipboard
CacheService.get(key, valueLoader) is incorrectly implemented
The CacheService interface contains a bogus implementation of the method get(String key, Callable<V> valueLoader), which never actually invokes the valueLoader. Probably, the default implementation should invoke valueLoader.call() iff a call to get(key) returns null. Of course, null value is different than key missing, but at this level we cannot tell the difference.
As an aside, the Guava-based implementation in scijava-cache does use the valueLoader.