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

Skip to content
Snippets Groups Projects
Commit 51e35eb5 authored by zzz's avatar zzz
Browse files

Utils: Handle Java version detection for internal or ea versions

parent 4f0cae59
No related branches found
No related tags found
No related merge requests found
...@@ -70,13 +70,19 @@ public abstract class SystemVersion { ...@@ -70,13 +70,19 @@ public abstract class SystemVersion {
if (_isAndroid) { if (_isAndroid) {
_oneDotSix = _androidSDK >= 9; _oneDotSix = _androidSDK >= 9;
_oneDotSeven = _androidSDK >= 19; _oneDotSeven = _androidSDK >= 19;
// https://developer.android.com/guide/platform/j8-jack.html
// some stuff in 23, some in 24
_oneDotEight = false; _oneDotEight = false;
_oneDotNine = false; _oneDotNine = false;
} else { } else {
_oneDotSix = VersionComparator.comp(System.getProperty("java.version"), "1.6") >= 0; String version = System.getProperty("java.version");
_oneDotSeven = _oneDotSix && VersionComparator.comp(System.getProperty("java.version"), "1.7") >= 0; // handle versions like "8-ea" or "9-internal"
_oneDotEight = _oneDotSeven && VersionComparator.comp(System.getProperty("java.version"), "1.8") >= 0; if (!version.startsWith("1."))
_oneDotNine = _oneDotEight && VersionComparator.comp(System.getProperty("java.version"), "1.9") >= 0; version = "1." + version;
_oneDotSix = VersionComparator.comp(version, "1.6") >= 0;
_oneDotSeven = _oneDotSix && VersionComparator.comp(version, "1.7") >= 0;
_oneDotEight = _oneDotSeven && VersionComparator.comp(version, "1.8") >= 0;
_oneDotNine = _oneDotEight && VersionComparator.comp(version, "1.9") >= 0;
} }
} }
......
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