File tree Expand file tree Collapse file tree 2 files changed +7
-11
lines changed
src/main/java/org/scijava/cache Expand file tree Collapse file tree 2 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -63,5 +63,11 @@ public interface CacheService extends SciJavaService {
6363 * of the value loader.
6464 * @throws ExecutionException
6565 */
66- <V > V get (Object key , Callable <V > valueLoader ) throws ExecutionException ;
66+ @ SuppressWarnings ("unchecked" )
67+ default <V > V get (final Object key , final Callable <V > valueLoader )
68+ throws ExecutionException
69+ {
70+ return (V )get (key );
71+ }
72+
6773}
Original file line number Diff line number Diff line change 3333
3434import java .util .Map ;
3535import java .util .WeakHashMap ;
36- import java .util .concurrent .Callable ;
37- import java .util .concurrent .ExecutionException ;
3836
3937import org .scijava .Priority ;
4038import org .scijava .plugin .Plugin ;
@@ -61,14 +59,6 @@ public Object get(final Object key) {
6159 return map .get (key );
6260 }
6361
64- @ SuppressWarnings ("unchecked" )
65- @ Override
66- public <V > V get (final Object key , final Callable <V > valueLoader )
67- throws ExecutionException
68- {
69- return (V )get (key );
70- }
71-
7262 // -- Service Methods --
7363
7464 @ Override
You can’t perform that action at this time.
0 commit comments