File tree Expand file tree Collapse file tree 3 files changed +7
-20
lines changed
main/java/org/scijava/io/location
test/java/org/scijava/io/location Expand file tree Collapse file tree 3 files changed +7
-20
lines changed Original file line number Diff line number Diff line change 3333package org .scijava .io .location ;
3434
3535import java .net .URI ;
36- import java .util .HashMap ;
37- import java .util .Map ;
3836
3937import org .scijava .plugin .AbstractHandlerService ;
4038import org .scijava .plugin .Plugin ;
@@ -50,11 +48,5 @@ public class DefaultLocationService extends
5048 AbstractHandlerService <URI , LocationResolver > implements
5149 LocationService
5250{
53-
54- private final Map <String , LocationResolver > resolvers = new HashMap <>();
55-
56- @ Override
57- public LocationResolver getResolver (final URI uri ) {
58- return resolvers .computeIfAbsent (uri .getScheme (), u -> getHandler (uri ));
59- }
51+ // NB: No implementation needed.
6052}
Original file line number Diff line number Diff line change @@ -86,16 +86,11 @@ default Location resolve(URI uri) throws URISyntaxException {
8686 return resolver != null ? resolver .resolve (uri ) : null ;
8787 }
8888
89- /**
90- * Returns a {@link LocationResolver} capable of resolving URL like the one
91- * provided to this method. Allows faster repeated resolving of similar URIs
92- * without going through this service.
93- *
94- * @param uri the uri
95- * @return the {@link LocationResolver} for this uri type, or
96- * <code>null</code> if no resolver could be found.
97- */
98- LocationResolver getResolver (URI uri );
89+ /** @deprecated Use {@link #getHandler(URI)} instead. */
90+ @ Deprecated
91+ default LocationResolver getResolver (URI uri ) {
92+ return getHandler (uri );
93+ }
9994
10095 // -- PTService methods --
10196
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ public void testResolve() throws URISyntaxException {
5555 final LocationService loc = ctx .getService (LocationService .class );
5656
5757 final URI uri = new File (new File ("." ).getAbsolutePath ()).toURI ();
58- final LocationResolver res = loc .getResolver (uri );
58+ final LocationResolver res = loc .getHandler (uri );
5959
6060 assertTrue (res instanceof FileLocationResolver );
6161 assertEquals (uri , res .resolve (uri ).getURI ());
You can’t perform that action at this time.
0 commit comments