From cccfcc6caefe2bbed67d6b1ae9d0b7bada2616a0 Mon Sep 17 00:00:00 2001 From: Donald Raab Date: Fri, 1 Dec 2023 15:59:50 -0500 Subject: [PATCH] Update Coffee Kata to JDK 21. Signed-off-by: Donald Raab --- README.md | 2 +- coffee-shop-kata-solutions/pom.xml | 6 +++--- coffee-shop-kata/SETUP.md | 13 ++++++------- coffee-shop-kata/jdk21/pom.xml | 4 ++-- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 71f50db0..d8dcf43d 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Guava, Apache Commons and/or Vavr on a simple domain ## What you will need to build the katas -1. Java 17 +1. Java 21 2. Maven 3.6.1+ 3. IDE of your choice diff --git a/coffee-shop-kata-solutions/pom.xml b/coffee-shop-kata-solutions/pom.xml index 28dd4062..20c2b3ce 100644 --- a/coffee-shop-kata-solutions/pom.xml +++ b/coffee-shop-kata-solutions/pom.xml @@ -32,8 +32,8 @@ UTF-8 - 20 - 20 + 21 + 21 5.10.0 @@ -70,4 +70,4 @@ - \ No newline at end of file + diff --git a/coffee-shop-kata/SETUP.md b/coffee-shop-kata/SETUP.md index 717a5992..8098bc9a 100644 --- a/coffee-shop-kata/SETUP.md +++ b/coffee-shop-kata/SETUP.md @@ -1,11 +1,10 @@ ## Setting up the project ### Requirements -* [JDK 20](https://jdk.java.net/20/) installed on your computer +* [JDK 21](https://jdk.java.net/21/) installed on your computer - Note: The latest version of IntelliJ only supports Java 20 * [Maven 3.6.1+](https://maven.apache.org/download.cgi) installed on your computer -* [IntelliJ IDEA 2023.1+](https://www.jetbrains.com/idea/download/?section=windows) or similar IDE for Java +* [IntelliJ IDEA 2023.2.5+](https://www.jetbrains.com/idea/download/?section=windows) or similar IDE for Java ### Project setup 1. Git clone the entire [code-katas](https://github.com/BNYMellon/CodeKatas) project from GitHub or download the project @@ -13,10 +12,10 @@ 2. Launch the project in the IDE and point to the pom.xml to be opened as a project. You can find more instructions on how to do that [here](https://www.jetbrains.com/idea/guide/tutorials/working-with-maven/importing-a-project/). -3. To use Java 20 preview features in IntelliJ IDEA, follow these steps: +3. To use Java 21 features in IntelliJ IDEA, follow these steps: - Go to File | Project Structure. - - Set the Project SDK to 20. - - Set the Project language level to "20 (Preview)...". + - Set the Project SDK to 21. + - Set the Project language level to "21 - Record patterns, pattern matching for switch...". - Make sure you have the correct JDK selected. 4. To verify that the Java 8 module is set up correctly, run [CoffeeShopTest](jdk8/src/test/java/bnymellon/codekatas/coffeeshopkata/CoffeeShopTest.java) in the @@ -26,4 +25,4 @@ jdk21 module - the class should compile but all tests will fail. ### Getting started -* Follow the [README](README.md) for instructions on how to complete the kata. \ No newline at end of file +* Follow the [README](README.md) for instructions on how to complete the kata. diff --git a/coffee-shop-kata/jdk21/pom.xml b/coffee-shop-kata/jdk21/pom.xml index e99dbc34..f9bb46fd 100644 --- a/coffee-shop-kata/jdk21/pom.xml +++ b/coffee-shop-kata/jdk21/pom.xml @@ -30,8 +30,8 @@ UTF-8 - 20 - 20 + 21 + 21 5.10.0