Follow in the footsteps of refactoring guru Martin Fowler as he improves the design of a program in a simple yet instructive refactoring example whose JavaScript code and associated refactoring is herein adapted to Java.
Based on the second edition of ‘the’ Refactoring book.
In the process, we’ll be using the following Java language features incorporated into long-term support (LTS) version JDK 17 (the previous LTS version being JDK 11):
Text blocks (JDK 15)
Records (JDK 16)
Sealed interfaces (JDK 17)
Here is a github repository with the whole refactoring, from start to finish, following the steps seen in the slides https://github.com/philipschwarz/refactoring-a-first-example-java