I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Verified Commit a325e634 authored by idk's avatar idk
Browse files

use updateType instead of key for error message in ConsoleUpdateManager with custom UPP

parent 309e3063
No related branches found
No related tags found
No related merge requests found
...@@ -58,7 +58,7 @@ import net.i2p.util.VersionComparator; ...@@ -58,7 +58,7 @@ import net.i2p.util.VersionComparator;
* @since 0.9.4 * @since 0.9.4
*/ */
public class ConsoleUpdateManager implements UpdateManager, RouterApp { public class ConsoleUpdateManager implements UpdateManager, RouterApp {
private final RouterContext _context; private final RouterContext _context;
private final Log _log; private final Log _log;
private final Collection<RegisteredUpdater> _registeredUpdaters; private final Collection<RegisteredUpdater> _registeredUpdaters;
...@@ -754,7 +754,7 @@ public class ConsoleUpdateManager implements UpdateManager, RouterApp { ...@@ -754,7 +754,7 @@ public class ConsoleUpdateManager implements UpdateManager, RouterApp {
_log.info("Unregistering " + ru); _log.info("Unregistering " + ru);
_registeredUpdaters.remove(ru); _registeredUpdaters.remove(ru);
} }
public void register(Checker updater, UpdateType type, UpdateMethod method, int priority) { public void register(Checker updater, UpdateType type, UpdateMethod method, int priority) {
RegisteredChecker rc = new RegisteredChecker(updater, type, method, priority); RegisteredChecker rc = new RegisteredChecker(updater, type, method, priority);
if (_log.shouldLog(Log.INFO)) if (_log.shouldLog(Log.INFO))
...@@ -785,7 +785,7 @@ public class ConsoleUpdateManager implements UpdateManager, RouterApp { ...@@ -785,7 +785,7 @@ public class ConsoleUpdateManager implements UpdateManager, RouterApp {
if (old != null && _log.shouldLog(Log.WARN)) if (old != null && _log.shouldLog(Log.WARN))
_log.warn("Duplicate registration " + upp); _log.warn("Duplicate registration " + upp);
} }
/** /**
* Called by the Updater, either after check() was called, or it found out on its own. * Called by the Updater, either after check() was called, or it found out on its own.
* Use this if there is only one UpdateMethod; otherwise use the Map method below. * Use this if there is only one UpdateMethod; otherwise use the Map method below.
...@@ -1251,7 +1251,7 @@ public class ConsoleUpdateManager implements UpdateManager, RouterApp { ...@@ -1251,7 +1251,7 @@ public class ConsoleUpdateManager implements UpdateManager, RouterApp {
if (old != null && old.compareTo(ver) <= 0) if (old != null && old.compareTo(ver) <= 0)
_available.remove(ui); _available.remove(ui);
} }
/** from NewsFetcher */ /** from NewsFetcher */
boolean shouldInstall() { boolean shouldInstall() {
String policy = _context.getProperty(ConfigUpdateHandler.PROP_UPDATE_POLICY); String policy = _context.getProperty(ConfigUpdateHandler.PROP_UPDATE_POLICY);
...@@ -1261,7 +1261,7 @@ public class ConsoleUpdateManager implements UpdateManager, RouterApp { ...@@ -1261,7 +1261,7 @@ public class ConsoleUpdateManager implements UpdateManager, RouterApp {
File zip = new File(_context.getRouterDir(), Router.UPDATE_FILE); File zip = new File(_context.getRouterDir(), Router.UPDATE_FILE);
return !zip.exists(); return !zip.exists();
} }
/** /**
* Where to find various resources * Where to find various resources
* @return non-null may be empty * @return non-null may be empty
...@@ -1383,7 +1383,7 @@ public class ConsoleUpdateManager implements UpdateManager, RouterApp { ...@@ -1383,7 +1383,7 @@ public class ConsoleUpdateManager implements UpdateManager, RouterApp {
upp.updateDownloadedandVerified(updateType, ftype, actualVersion, temp); upp.updateDownloadedandVerified(updateType, ftype, actualVersion, temp);
_externalRestartPending = true; _externalRestartPending = true;
} else { } else {
err = "Unsupported su3 file type " + ftype + " " + key; err = "Unsupported su3 file type " + ftype + " " + updateType;
} }
} else { } else {
err = "Unsupported su3 file type " + ftype; err = "Unsupported su3 file type " + ftype;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment