From 134774b673882d8896ea0d631fe5426868fc5319 Mon Sep 17 00:00:00 2001 From: joohyukkim Date: Tue, 10 Dec 2024 21:37:40 +0900 Subject: [PATCH 1/2] clean up and merge record tests into main --- .java-version | 1 + .../jr/ob/record}/Java17RecordTest.java | 7 +- .../jr/ob/record}/RecordDeser167Test.java | 7 +- .../jr/ob/record}/RecordDeser172Test.java | 7 +- .../tools/jackson/jr/ob/record}/Wrapper.java | 10 +- jr-record-test/pom.xml | 123 ------------------ pom.xml | 1 - 7 files changed, 14 insertions(+), 142 deletions(-) create mode 100644 .java-version rename {jr-record-test/src/test-jdk17/java/jr => jr-objects/src/test/java/tools/jackson/jr/ob/record}/Java17RecordTest.java (98%) rename {jr-record-test/src/test-jdk17/java/jr => jr-objects/src/test/java/tools/jackson/jr/ob/record}/RecordDeser167Test.java (90%) rename {jr-record-test/src/test-jdk17/java/jr => jr-objects/src/test/java/tools/jackson/jr/ob/record}/RecordDeser172Test.java (89%) rename {jr-record-test/src/test-jdk17/java/jr => jr-objects/src/test/java/tools/jackson/jr/ob/record}/Wrapper.java (84%) delete mode 100644 jr-record-test/pom.xml diff --git a/.java-version b/.java-version new file mode 100644 index 00000000..0af80b73 --- /dev/null +++ b/.java-version @@ -0,0 +1 @@ +temurin64-17.0.8.1 diff --git a/jr-record-test/src/test-jdk17/java/jr/Java17RecordTest.java b/jr-objects/src/test/java/tools/jackson/jr/ob/record/Java17RecordTest.java similarity index 98% rename from jr-record-test/src/test-jdk17/java/jr/Java17RecordTest.java rename to jr-objects/src/test/java/tools/jackson/jr/ob/record/Java17RecordTest.java index a2595729..1c63f6f4 100644 --- a/jr-record-test/src/test-jdk17/java/jr/Java17RecordTest.java +++ b/jr-objects/src/test/java/tools/jackson/jr/ob/record/Java17RecordTest.java @@ -1,15 +1,14 @@ -package jr; +package tools.jackson.jr.ob.record; import java.util.Map; -import junit.framework.TestCase; - import tools.jackson.jr.ob.JSON; +import tools.jackson.jr.ob.TestBase; /** * This test is in test module since the JDK version to be tested is higher than other, and hence supports Records. */ -public class Java17RecordTest extends TestCase +public class Java17RecordTest extends TestBase { private final JSON jsonHandler = JSON.std; diff --git a/jr-record-test/src/test-jdk17/java/jr/RecordDeser167Test.java b/jr-objects/src/test/java/tools/jackson/jr/ob/record/RecordDeser167Test.java similarity index 90% rename from jr-record-test/src/test-jdk17/java/jr/RecordDeser167Test.java rename to jr-objects/src/test/java/tools/jackson/jr/ob/record/RecordDeser167Test.java index 19ffc9f1..dcc8e080 100644 --- a/jr-record-test/src/test-jdk17/java/jr/RecordDeser167Test.java +++ b/jr-objects/src/test/java/tools/jackson/jr/ob/record/RecordDeser167Test.java @@ -1,10 +1,9 @@ -package jr; +package tools.jackson.jr.ob.record; import tools.jackson.jr.ob.JSON; +import tools.jackson.jr.ob.TestBase; -import junit.framework.TestCase; - -public class RecordDeser167Test extends TestCase +public class RecordDeser167Test extends TestBase { record FoundDependency(String id, String g, String a, String v, String timestamp) {} diff --git a/jr-record-test/src/test-jdk17/java/jr/RecordDeser172Test.java b/jr-objects/src/test/java/tools/jackson/jr/ob/record/RecordDeser172Test.java similarity index 89% rename from jr-record-test/src/test-jdk17/java/jr/RecordDeser172Test.java rename to jr-objects/src/test/java/tools/jackson/jr/ob/record/RecordDeser172Test.java index 7e2a9bfd..53b5810a 100644 --- a/jr-record-test/src/test-jdk17/java/jr/RecordDeser172Test.java +++ b/jr-objects/src/test/java/tools/jackson/jr/ob/record/RecordDeser172Test.java @@ -1,13 +1,12 @@ -package jr; +package tools.jackson.jr.ob.record; import java.time.Instant; import java.time.ZoneId; -import junit.framework.TestCase; - import tools.jackson.jr.ob.JSON; +import tools.jackson.jr.ob.TestBase; -public class RecordDeser172Test extends TestCase +public class RecordDeser172Test extends TestBase { record FoundDependency(String id, String g, String a, String v, long timestamp) { public String getDateTime() { diff --git a/jr-record-test/src/test-jdk17/java/jr/Wrapper.java b/jr-objects/src/test/java/tools/jackson/jr/ob/record/Wrapper.java similarity index 84% rename from jr-record-test/src/test-jdk17/java/jr/Wrapper.java rename to jr-objects/src/test/java/tools/jackson/jr/ob/record/Wrapper.java index 725575f9..a5ad2945 100644 --- a/jr-record-test/src/test-jdk17/java/jr/Wrapper.java +++ b/jr-objects/src/test/java/tools/jackson/jr/ob/record/Wrapper.java @@ -1,18 +1,16 @@ -package jr; - -import jr.Java17RecordTest.Cow; +package tools.jackson.jr.ob.record; import java.util.Objects; public final class Wrapper { - Cow cow; + Java17RecordTest.Cow cow; String farmerName; - public Cow getCow() { + public Java17RecordTest.Cow getCow() { return cow; } - public void setCow(Cow cow) { + public void setCow(Java17RecordTest.Cow cow) { this.cow = cow; } diff --git a/jr-record-test/pom.xml b/jr-record-test/pom.xml deleted file mode 100644 index 81cd16ab..00000000 --- a/jr-record-test/pom.xml +++ /dev/null @@ -1,123 +0,0 @@ - - 4.0.0 - - tools.jackson.jr - jackson-jr-parent - 3.0.0-SNAPSHOT - - jackson-jr-record-test - jar - Test Module for testing JDK 17 Record support - https://github.com/FasterXML/jackson-jr - - UTF-8 - - - - - tools.jackson.jr - jackson-jr-objects - test - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${maven.compiler.source} - ${maven.compiler.target} - - - - org.apache.maven.plugins - maven-surefire-plugin - - - - test - - - - - - **/*Test.java - **/Test*.java - - - - - - - org.apache.maven.plugins - maven-install-plugin - - true - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - - - - - java17 - - [17,) - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - add-test-source - generate-test-sources - - add-test-source - - - - src/test-jdk17/java - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - true - - - 17 - 17 - - -parameters - - - - - org.apache.maven.plugins - maven-surefire-plugin - - --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED - - - - - - - - diff --git a/pom.xml b/pom.xml index 61e1c926..0afa7b3d 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,6 @@ jr-stree jr-annotation-support jr-extension-javatime - jr-record-test jr-groovy-test jr-all From cd0faee03cc4bcfc3075173924794e2b97568788 Mon Sep 17 00:00:00 2001 From: "Kim, Joo Hyuk" Date: Wed, 11 Dec 2024 12:50:40 +0900 Subject: [PATCH 2/2] Delete .java-version --- .java-version | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .java-version diff --git a/.java-version b/.java-version deleted file mode 100644 index 0af80b73..00000000 --- a/.java-version +++ /dev/null @@ -1 +0,0 @@ -temurin64-17.0.8.1