* DatabaseLookupmessage:

- Add support for requesting an encrypted reply
* NetDB:
  - Add support for encrypted DatabaseSearchReplyMessage and DatabaseStoreMessage
    in response to a DatabaseLookupMessage
* PRNG: Cleanups using Collections.singletonMap()
* Router utils: New RemovableSingletonSet
* TransientSessionKeyManager:
  - Support variable expiration for inbound tag sets
  - Several efficiency improvements
* VersionComparator: Add static method, use most places
This commit is contained in:
zzz
2013-05-26 17:25:02 +00:00
parent 1bd4937a4b
commit e394d3d4c5
24 changed files with 373 additions and 111 deletions

View File

@ -144,7 +144,7 @@ public class ConfigServiceHandler extends FormHandler {
if (ctx.hasWrapper() && _wrapperListener == null &&
!SystemVersion.isWindows()) {
String wv = System.getProperty("wrapper.version");
if (wv != null && (new VersionComparator()).compare(wv, LISTENER_AVAILABLE) >= 0) {
if (wv != null && VersionComparator.comp(wv, LISTENER_AVAILABLE) >= 0) {
try {
_wrapperListener = new WrapperListener(ctx);
} catch (Throwable t) {}

View File

@ -48,7 +48,7 @@ public class LogsHelper extends HelperBase {
File f = null;
if (ctx.hasWrapper()) {
String wv = System.getProperty("wrapper.version");
if (wv != null && (new VersionComparator()).compare(wv, LOCATION_AVAILABLE) >= 0) {
if (wv != null && VersionComparator.comp(wv, LOCATION_AVAILABLE) >= 0) {
try {
f = WrapperManager.getWrapperLogFile();
} catch (Throwable t) {}

View File

@ -73,7 +73,7 @@ public class PluginStarter implements Runnable {
!NewsHelper.isUpdateInProgress()) {
String prev = _context.getProperty("router.previousVersion");
if (prev != null &&
(new VersionComparator()).compare(RouterVersion.VERSION, prev) > 0) {
VersionComparator.comp(RouterVersion.VERSION, prev) > 0) {
updateAll(_context, true);
}
}
@ -236,7 +236,7 @@ public class PluginStarter implements Runnable {
String minVersion = ConfigClientsHelper.stripHTML(props, "min-i2p-version");
if (minVersion != null &&
(new VersionComparator()).compare(CoreVersion.VERSION, minVersion) < 0) {
VersionComparator.comp(CoreVersion.VERSION, minVersion) < 0) {
String foo = "Plugin " + appName + " requires I2P version " + minVersion + " or higher";
log.error(foo);
disablePlugin(appName);
@ -245,7 +245,7 @@ public class PluginStarter implements Runnable {
minVersion = ConfigClientsHelper.stripHTML(props, "min-java-version");
if (minVersion != null &&
(new VersionComparator()).compare(System.getProperty("java.version"), minVersion) < 0) {
VersionComparator.comp(System.getProperty("java.version"), minVersion) < 0) {
String foo = "Plugin " + appName + " requires Java version " + minVersion + " or higher";
log.error(foo);
disablePlugin(appName);
@ -255,7 +255,7 @@ public class PluginStarter implements Runnable {
String jVersion = LogsHelper.jettyVersion();
minVersion = ConfigClientsHelper.stripHTML(props, "min-jetty-version");
if (minVersion != null &&
(new VersionComparator()).compare(minVersion, jVersion) > 0) {
VersionComparator.comp(minVersion, jVersion) > 0) {
String foo = "Plugin " + appName + " requires Jetty version " + minVersion + " or higher";
log.error(foo);
disablePlugin(appName);
@ -264,7 +264,7 @@ public class PluginStarter implements Runnable {
String maxVersion = ConfigClientsHelper.stripHTML(props, "max-jetty-version");
if (maxVersion != null &&
(new VersionComparator()).compare(maxVersion, jVersion) < 0) {
VersionComparator.comp(maxVersion, jVersion) < 0) {
String foo = "Plugin " + appName + " requires Jetty version " + maxVersion + " or lower";
log.error(foo);
disablePlugin(appName);