File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
src/main/java/org/scijava Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 5959import org .scijava .plugin .PluginInfo ;
6060import org .scijava .service .Service ;
6161import org .scijava .util .ClassUtils ;
62- import org .scijava .util .Manifest ;
6362import org .scijava .util .StringMaker ;
63+ import org .scijava .util .VersionUtils ;
6464
6565/**
6666 * A collection of metadata about a particular {@link Command}.
@@ -442,8 +442,7 @@ public String getLocation() {
442442 @ Override
443443 public String getVersion () {
444444 try {
445- final Manifest m = Manifest .getManifest (loadDelegateClass ());
446- return m == null ? null : m .getImplementationVersion ();
445+ return VersionUtils .getVersion (loadDelegateClass ());
447446 }
448447 catch (final ClassNotFoundException exc ) {
449448 return null ;
Original file line number Diff line number Diff line change 4646import org .scijava .module .event .ModulesUpdatedEvent ;
4747import org .scijava .util .ClassUtils ;
4848import org .scijava .util .ConversionUtils ;
49- import org .scijava .util .Manifest ;
49+ import org .scijava .util .VersionUtils ;
5050
5151/**
5252 * Abstract superclass of {@link ModuleInfo} implementation.
@@ -197,8 +197,7 @@ public String getVersion() {
197197 // If the same delegate class is used for more than one module, though,
198198 // it may need to override this method to indicate a different version.
199199 try {
200- final Manifest m = Manifest .getManifest (loadDelegateClass ());
201- return m == null ? null : m .getImplementationVersion ();
200+ return VersionUtils .getVersion (loadDelegateClass ());
202201 }
203202 catch (final ClassNotFoundException exc ) {
204203 return null ;
You can’t perform that action at this time.
0 commit comments