diff --git a/src/main/java/net/imagej/ui/swing/updater/ImageJUpdater.java b/src/main/java/net/imagej/ui/swing/updater/ImageJUpdater.java index 6afc161..fb0bdf8 100644 --- a/src/main/java/net/imagej/ui/swing/updater/ImageJUpdater.java +++ b/src/main/java/net/imagej/ui/swing/updater/ImageJUpdater.java @@ -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!"; diff --git a/src/main/java/net/imagej/ui/swing/updater/UpdaterFrame.java b/src/main/java/net/imagej/ui/swing/updater/UpdaterFrame.java index 7af6a1b..7d210fd 100644 --- a/src/main/java/net/imagej/ui/swing/updater/UpdaterFrame.java +++ b/src/main/java/net/imagej/ui/swing/updater/UpdaterFrame.java @@ -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)"); } } @@ -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; } @@ -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();