Consolidate Java version checking code, fix bugs

where versions are in different forms
Add warning about Java 7
This commit is contained in:
zzz
2019-05-12 20:20:13 +00:00
parent adb1c6f58e
commit 04a985cd8c
5 changed files with 43 additions and 10 deletions

View File

@@ -409,8 +409,7 @@ class PluginUpdateRunner extends UpdateRunner {
}
minVersion = PluginStarter.stripHTML(props, "min-java-version");
if (minVersion != null &&
VersionComparator.comp(System.getProperty("java.version"), minVersion) < 0) {
if (minVersion != null && !SystemVersion.isJava(minVersion)) {
to.delete();
statusDone("<b>" + _t("This plugin requires Java version {0} or higher", minVersion) + "</b>");
return;