From 8cc0b0313aba96db47c93faf545732913fa10819 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=87=91=E6=88=9F?= Date: Thu, 22 Oct 2020 21:05:17 +0800 Subject: [PATCH] anchoring base jdk version to 1.6+ --- testable-agent/pom.xml | 14 ++++++++++++++ testable-core/pom.xml | 6 +++--- .../translator/EnableTestableTranslator.java | 6 +++--- .../testable/core/util/StringUtilTest.java | 2 +- testable-maven-plugin/pom.xml | 18 ++++++++++++++++-- 5 files changed, 37 insertions(+), 9 deletions(-) diff --git a/testable-agent/pom.xml b/testable-agent/pom.xml index 09d9e85..5b5ffdd 100755 --- a/testable-agent/pom.xml +++ b/testable-agent/pom.xml @@ -10,7 +10,11 @@ testable-agent + 1.6 + 1.6 + UTF-8 8.0.1 + 3.8.1 3.2.0 3.2.4 @@ -32,6 +36,16 @@ testable-agent + + org.apache.maven.plugins + maven-compiler-plugin + ${plugin.compiler.version} + + ${project.compiler.level} + ${project.compiler.level} + ${project.build.sourceEncoding} + + org.apache.maven.plugins maven-jar-plugin diff --git a/testable-core/pom.xml b/testable-core/pom.xml index cc4faa0..8bacc5d 100644 --- a/testable-core/pom.xml +++ b/testable-core/pom.xml @@ -11,10 +11,10 @@ testable-core - 3.8.1 - 3.1.0 + 1.6 + 1.6 UTF-8 - 1.7 + 3.8.1 diff --git a/testable-core/src/main/java/com/alibaba/testable/core/translator/EnableTestableTranslator.java b/testable-core/src/main/java/com/alibaba/testable/core/translator/EnableTestableTranslator.java index 11c56f3..7473891 100644 --- a/testable-core/src/main/java/com/alibaba/testable/core/translator/EnableTestableTranslator.java +++ b/testable-core/src/main/java/com/alibaba/testable/core/translator/EnableTestableTranslator.java @@ -19,9 +19,9 @@ import java.lang.reflect.Modifier; public class EnableTestableTranslator extends BaseTranslator { private final String sourceClassName; - private final ListBuffer sourceClassIns = new ListBuffer<>(); - private final ListBuffer privateOrFinalFields = new ListBuffer<>(); - private final ListBuffer privateMethods = new ListBuffer<>(); + private final ListBuffer sourceClassIns = new ListBuffer(); + private final ListBuffer privateOrFinalFields = new ListBuffer(); + private final ListBuffer privateMethods = new ListBuffer(); private final PrivateAccessStatementGenerator privateAccessStatementGenerator; public EnableTestableTranslator(String pkgName, String testClassName, TestableContext cx) { diff --git a/testable-core/src/test/java/com/alibaba/testable/core/util/StringUtilTest.java b/testable-core/src/test/java/com/alibaba/testable/core/util/StringUtilTest.java index b81a446..131a3a1 100644 --- a/testable-core/src/test/java/com/alibaba/testable/core/util/StringUtilTest.java +++ b/testable-core/src/test/java/com/alibaba/testable/core/util/StringUtilTest.java @@ -11,7 +11,7 @@ class StringUtilTest { @Test void should_able_to_join_string() { - List list = new ArrayList<>(4); + List list = new ArrayList(4); list.add("a"); list.add("b"); list.add("c"); diff --git a/testable-maven-plugin/pom.xml b/testable-maven-plugin/pom.xml index 619997f..5b4cc57 100644 --- a/testable-maven-plugin/pom.xml +++ b/testable-maven-plugin/pom.xml @@ -9,8 +9,12 @@ http://maven.apache.org - 1.8 0.2.0-SNAPSHOT + 1.6 + 1.6 + UTF-8 + 3.8.1 + 3.6.0 @@ -39,10 +43,20 @@ + + org.apache.maven.plugins + maven-compiler-plugin + ${plugin.compiler.version} + + ${project.compiler.level} + ${project.compiler.level} + ${project.build.sourceEncoding} + + org.apache.maven.plugins maven-plugin-plugin - 3.6.0 + ${maven.plugin.version}