diff --git a/core-java-modules/core-java-12/pom.xml b/core-java-modules/core-java-12/pom.xml index ba6dfc62bc..8165549d8c 100644 --- a/core-java-modules/core-java-12/pom.xml +++ b/core-java-modules/core-java-12/pom.xml @@ -8,9 +8,9 @@ jar - com.baeldung - parent-modules - 1.0.0-SNAPSHOT + com.baeldung.core-java-modules + core-java-modules + 0.0.1-SNAPSHOT @@ -21,30 +21,8 @@ - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven-compiler-plugin.version} - - ${maven.compiler.source.version} - ${maven.compiler.target.version} - --enable-preview - - - - maven-surefire-plugin - - --enable-preview - - - - - - 12 - 12 + 17 \ No newline at end of file diff --git a/core-java-modules/core-java-12/src/test/java/com/baeldung/switchExpression/SwitchUnitTest.java b/core-java-modules/core-java-12/src/test/java/com/baeldung/switchExpression/SwitchUnitTest.java index 708e416090..994c6d9a73 100644 --- a/core-java-modules/core-java-12/src/test/java/com/baeldung/switchExpression/SwitchUnitTest.java +++ b/core-java-modules/core-java-12/src/test/java/com/baeldung/switchExpression/SwitchUnitTest.java @@ -19,19 +19,6 @@ public class SwitchUnitTest { Assert.assertEquals(value, 2); } - @Test - public void switchLocalVariable(){ - var month = Month.AUG; - int i = switch (month){ - case JAN,JUN, JUL -> 3; - case FEB,SEP, OCT, NOV, DEC -> 1; - case MAR,MAY, APR, AUG -> { - int j = month.toString().length() * 4; - break j; - } - }; - Assert.assertEquals(12, i); - } enum Month {JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC} } diff --git a/core-java-modules/core-java-13/pom.xml b/core-java-modules/core-java-13/pom.xml index 11d6ee7007..52cf227583 100644 --- a/core-java-modules/core-java-13/pom.xml +++ b/core-java-modules/core-java-13/pom.xml @@ -8,39 +8,13 @@ jar - com.baeldung - parent-modules - 1.0.0-SNAPSHOT + com.baeldung.core-java-modules + core-java-modules + 0.0.1-SNAPSHOT - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven-compiler-plugin.version} - - ${maven.compiler.source.version} - ${maven.compiler.target.version} - 13 - --enable-preview - - - - org.apache.maven.plugins - maven-surefire-plugin - ${surefire.plugin.version} - - --enable-preview - - - - - - 13 - 13 - 3.0.0-M3 + 17 \ No newline at end of file diff --git a/core-java-modules/core-java-13/src/test/java/com/baeldung/newfeatures/SwitchExpressionsWithYieldUnitTest.java b/core-java-modules/core-java-13/src/test/java/com/baeldung/newfeatures/SwitchExpressionsWithYieldUnitTest.java index be1fcfd167..3d3f319218 100644 --- a/core-java-modules/core-java-13/src/test/java/com/baeldung/newfeatures/SwitchExpressionsWithYieldUnitTest.java +++ b/core-java-modules/core-java-13/src/test/java/com/baeldung/newfeatures/SwitchExpressionsWithYieldUnitTest.java @@ -7,7 +7,6 @@ import org.junit.Test; public class SwitchExpressionsWithYieldUnitTest { @Test - @SuppressWarnings("preview") public void whenSwitchingOnOperationSquareMe_thenWillReturnSquare() { var me = 4; var operation = "squareMe"; diff --git a/core-java-modules/core-java-13/src/test/java/com/baeldung/newfeatures/TextBlocksUnitTest.java b/core-java-modules/core-java-13/src/test/java/com/baeldung/newfeatures/TextBlocksUnitTest.java index 1f8ddcbfb4..e028e5f02c 100644 --- a/core-java-modules/core-java-13/src/test/java/com/baeldung/newfeatures/TextBlocksUnitTest.java +++ b/core-java-modules/core-java-13/src/test/java/com/baeldung/newfeatures/TextBlocksUnitTest.java @@ -8,7 +8,6 @@ public class TextBlocksUnitTest { private static final String JSON_STRING = "{\r\n" + "\"name\" : \"Baeldung\",\r\n" + "\"website\" : \"https://www.%s.com/\"\r\n" + "}"; - @SuppressWarnings("preview") private static final String TEXT_BLOCK_JSON = """ { "name" : "Baeldung", @@ -25,7 +24,6 @@ public class TextBlocksUnitTest { } - @SuppressWarnings("removal") @Test public void whenTextBlocks_thenFormattedWorksAsFormat() { assertThat(TEXT_BLOCK_JSON.formatted("baeldung") diff --git a/core-java-modules/core-java-13/src/test/java/com/baeldung/switchExpression/SwitchExpressionsUnitTest.java b/core-java-modules/core-java-13/src/test/java/com/baeldung/switchExpression/SwitchExpressionsUnitTest.java index bb9250f000..04aea79a67 100644 --- a/core-java-modules/core-java-13/src/test/java/com/baeldung/switchExpression/SwitchExpressionsUnitTest.java +++ b/core-java-modules/core-java-13/src/test/java/com/baeldung/switchExpression/SwitchExpressionsUnitTest.java @@ -13,7 +13,6 @@ import org.junit.Test; public class SwitchExpressionsUnitTest { @Test - @SuppressWarnings ("preview") public void whenSwitchingOverMonthJune_thenWillReturn3() { var month = JUNE; @@ -29,7 +28,6 @@ public class SwitchExpressionsUnitTest { } @Test - @SuppressWarnings ("preview") public void whenSwitchingOverMonthAugust_thenWillReturn24() { var month = AUGUST; @@ -47,7 +45,6 @@ public class SwitchExpressionsUnitTest { } @Test - @SuppressWarnings ("preview") public void whenSwitchingOverMonthJanuary_thenWillReturn3() { Function func = (month) -> { @@ -61,7 +58,6 @@ public class SwitchExpressionsUnitTest { } @Test - @SuppressWarnings ("preview") public void whenSwitchingOverMonthAugust_thenWillReturn2() { var month = AUGUST; diff --git a/core-java-modules/core-java-15/pom.xml b/core-java-modules/core-java-15/pom.xml index 3ac45d26ba..3996c69fa4 100644 --- a/core-java-modules/core-java-15/pom.xml +++ b/core-java-modules/core-java-15/pom.xml @@ -8,10 +8,9 @@ jar - com.baeldung - parent-modules - 1.0.0-SNAPSHOT - ../../pom.xml + com.baeldung.core-java-modules + core-java-modules + 0.0.1-SNAPSHOT @@ -27,33 +26,8 @@ - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven-compiler-plugin.version} - - ${maven.compiler.release} - --enable-preview - 14 - 14 - - - - org.apache.maven.plugins - maven-surefire-plugin - ${surefire.plugin.version} - - --enable-preview - - - - - - 15 - 3.0.0-M3 + 17 \ No newline at end of file diff --git a/core-java-modules/pom.xml b/core-java-modules/pom.xml index 5cae60bc2a..8cfd67aed3 100644 --- a/core-java-modules/pom.xml +++ b/core-java-modules/pom.xml @@ -34,6 +34,9 @@ core-java-11 core-java-11-2 core-java-11-3 + core-java-12 + core-java-13 + core-java-15 core-java-collections-array-list core-java-collections-array-list-2 core-java-collections-list-4 diff --git a/pom.xml b/pom.xml index e3a94e7223..91e0c54784 100644 --- a/pom.xml +++ b/pom.xml @@ -770,10 +770,7 @@ core-java-modules - - - @@ -1051,10 +1048,7 @@ core-java-modules gcp-firebase - - -