Changeset e59d7a82


Ignore:
Timestamp:
Sep 23, 2018 3:11:16 PM (2 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
34f0d7d7
Parents:
7a72049
Message:

Plugins: Blacklist neodatis and seedless for Java 9+ (ticket #2295)

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/update/PluginUpdateRunner.java

    r7a72049 re59d7a82  
    2929import net.i2p.util.SecureDirectory;
    3030import net.i2p.util.SecureFile;
     31import net.i2p.util.SystemVersion;
    3132import net.i2p.util.VersionComparator;
    3233
     
    475476                    statusDone("<b>" + _t("Plugin requires Jetty version {0} or lower", "8.9999") + "</b>");
    476477                    return;
     478                }
     479                if (SystemVersion.isJava9()) {
     480                    blacklistVersion = PluginStarter.java9Blacklist.get(appName);
     481                    if (blacklistVersion != null &&
     482                        VersionComparator.comp(version, blacklistVersion) <= 0) {
     483                        to.delete();
     484                        statusDone("<b>" + _t("Plugin requires Java version {0} or lower", "8.9999") + "</b>");
     485                        return;
     486                    }
    477487                }
    478488                maxVersion = PluginStarter.stripHTML(props, "max-jetty-version");
  • apps/routerconsole/java/src/net/i2p/router/web/PluginStarter.java

    r7a72049 re59d7a82  
    3737import net.i2p.util.PortMapper;
    3838import net.i2p.util.SimpleTimer2;
     39import net.i2p.util.SystemVersion;
    3940import net.i2p.util.Translate;
    4041import net.i2p.util.VersionComparator;
     
    7980
    8081    static {
    81         Map<String, String> map = new HashMap<String, String>(4);
     82        Map<String, String> map = new HashMap<String, String>(2);
    8283        map.put("i2pbote", "0.4.5");
    8384        map.put("BwSchedule", "0.0.36");
    8485        jetty9Blacklist = Collections.unmodifiableMap(map);
     86    }
     87
     88    /**
     89     *  Plugin name to plugin version of plugins that do not work
     90     *  with Java 9+
     91     *  Unmodifiable.
     92     *
     93     *  @since 0.9.30
     94     */
     95    public static final Map<String, String> java9Blacklist;
     96
     97    static {
     98        Map<String, String> map = new HashMap<String, String>(2);
     99        map.put("01_neodatis", "2.1-2.14-209-17");
     100        map.put("02_seedless", "0.1.7-0.1.12");
     101        java9Blacklist = Collections.unmodifiableMap(map);
    85102    }
    86103
     
    361378            foo = gettext("Plugin requires Jetty version {0} or lower", "8.9999", ctx);
    362379            throw new Exception(foo);
     380        }
     381
     382        if (SystemVersion.isJava9()) {
     383            blacklistVersion = java9Blacklist.get(appName);
     384            if (blacklistVersion != null &&
     385                VersionComparator.comp(curVersion, blacklistVersion) <= 0) {
     386                String foo = "Plugin " + appName + " requires Jetty version 8.9999 or lower";
     387                log.error(foo);
     388                disablePlugin(appName);
     389                foo = gettext("Plugin requires Java version {0} or lower", "8.9999", ctx);
     390                throw new Exception(foo);
     391            }
    363392        }
    364393
  • history.txt

    r7a72049 re59d7a82  
     12018-09-23 zzz
     2 * Plugins: Blacklist neodatis and seedless for Java 9+ (ticket #2295)
     3
    142018-09-22 zzz
    25 * NTCP:
  • router/java/src/net/i2p/router/RouterVersion.java

    r7a72049 re59d7a82  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 5;
     21    public final static long BUILD = 6;
    2222
    2323    /** for example "-test" */
Note: See TracChangeset for help on using the changeset viewer.