From 446eb983de84a4240b387bfd6c080a3d90281363 Mon Sep 17 00:00:00 2001 From: zongyu Date: Mon, 22 Jun 2020 15:18:19 +0800 Subject: jdk-8 -> jdk-1.8 Signed-off-by: zongyu --- src/main/java/org/gentoo/java/ebuilder/maven/JavaVersion.java | 9 +++++++-- 1 file 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; + } + } /** -- cgit v1.2.3-65-gdbad