Skip to content

Commit

Permalink
ImageJUpdater: let any/all services be null
Browse files Browse the repository at this point in the history
The code was already written to support the services not being set,
with various fallbacks in place. So let's mark the params accordingly.
  • Loading branch information
ctrueden committed Oct 19, 2024
1 parent 974f8d0 commit 4f70b9a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/main/java/net/imagej/ui/swing/updater/ImageJUpdater.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,16 @@
public class ImageJUpdater implements UpdaterUI {
private UpdaterFrame main;

@Parameter
@Parameter(required = false)
private StatusService statusService;

@Parameter
@Parameter(required = false)
private LogService log;

@Parameter
@Parameter(required = false)
private UploaderService uploaderService;

@Parameter
@Parameter(required = false)
private CommandService commandService;

private final static String UPDATER_UPDATING_THREAD_NAME = "Updating the Updater itself!";
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/net/imagej/ui/swing/updater/UpdaterFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ public void run() {
upload();
}
catch (final InstantiationException e) {
log.error(e);
if (log != null) log.error(e);
error("Could not upload (possibly unknown protocol)");
}
}
Expand Down Expand Up @@ -395,7 +395,7 @@ public void setVisible(final boolean visible) {
} catch (final InterruptedException e) {
// ignore
} catch (final InvocationTargetException e) {
log.error(e);
if (log != null) log.error(e);
}
return;
}
Expand Down Expand Up @@ -606,7 +606,7 @@ public void install() {
installer.done();
}
catch (final Exception e) {
log.error(e);
if (log != null) log.error(e);
// TODO: remove "update/" directory
error("Installer failed: " + e);
installer.done();
Expand Down

0 comments on commit 4f70b9a

Please sign in to comment.