File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
src/main/java/org/scijava/search/module Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change 2929
3030package org .scijava .search .module ;
3131
32- import java .io .File ;
33- import java .net .URL ;
3432import java .util .LinkedHashMap ;
3533import java .util .Map ;
3634
3937import org .scijava .input .Accelerator ;
4038import org .scijava .module .ModuleInfo ;
4139import org .scijava .search .SearchResult ;
42- import org .scijava .util .ClassUtils ;
43- import org .scijava .util .FileUtils ;
4440
4541/**
4642 * Search result for the {@link ModuleSearcher}.
@@ -107,12 +103,8 @@ public Map<String, String> properties() {
107103 // -- Helper methods --
108104
109105 private String getLocation () {
110- final URL location = ClassUtils .getLocation (info .getDelegateClassName ());
111- final File file = FileUtils .urlToFile (location );
112- if (file == null ) return null ;
113- final String path = file .getAbsolutePath ();
114- if (path == null ) return null ;
115- if (path .startsWith (baseDir )) {
106+ final String path = info .getLocation ();
107+ if (path != null && baseDir != null && path .startsWith (baseDir )) {
116108 if (path .length () == baseDir .length ()) return "" ;
117109 return path .substring (baseDir .length () + 1 );
118110 }
You can’t perform that action at this time.
0 commit comments