diff options
author | 2020-06-22 15:18:19 +0800 | |
---|---|---|
committer | 2020-07-06 17:48:27 +0800 | |
commit | 446eb983de84a4240b387bfd6c080a3d90281363 (patch) | |
tree | 6de49d3eace57c47ef25872737eb3a3e14479a4c | |
parent | MavenVersion.class enhancement: (diff) | |
download | java-ebuilder-446eb983de84a4240b387bfd6c080a3d90281363.tar.gz java-ebuilder-446eb983de84a4240b387bfd6c080a3d90281363.tar.bz2 java-ebuilder-446eb983de84a4240b387bfd6c080a3d90281363.zip |
jdk-8 -> jdk-1.8
Signed-off-by: zongyu <zzy2529420793@gmail.com>
-rw-r--r-- | src/main/java/org/gentoo/java/ebuilder/maven/JavaVersion.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/org/gentoo/java/ebuilder/maven/JavaVersion.java b/src/main/java/org/gentoo/java/ebuilder/maven/JavaVersion.java index 7402cd2..b1918b0 100644 --- a/src/main/java/org/gentoo/java/ebuilder/maven/JavaVersion.java +++ b/src/main/java/org/gentoo/java/ebuilder/maven/JavaVersion.java @@ -32,8 +32,6 @@ public class JavaVersion { * @param versionString version string */ public JavaVersion(final String versionString) { - this.versionString = versionString; - final Matcher matcher = PATTERN_VERSION.matcher(versionString); if (!matcher.matches()) { @@ -42,6 +40,13 @@ public class JavaVersion { } versionNumber = Integer.parseInt(matcher.group(1), 10); + if (versionNumber <= 8) { + this.versionString = "1." + Integer.toString(versionNumber); + } + else { + this.versionString = versionString; + } + } /** |