𝐖𝐡𝐲 𝐉𝐚𝐯𝐚 8 𝐢𝐬 𝐭𝐡𝐞 "𝐅𝐢𝐞𝐥𝐝 𝐇𝐨𝐬𝐩𝐢𝐭𝐚𝐥" 𝐟𝐨𝐫 𝐋𝐞𝐠𝐚𝐜𝐲 𝐂𝐨𝐝𝐞 🏥 I recently spent a month rescuing a 20-year-old "Big Ball of Mud" written in Java 1.5. My first lesson? Don't try to be a hero and jump straight to Java 21. When dealing with "Software Archaeology," you need a 𝐆𝐨𝐥𝐝𝐞𝐧 𝐁𝐫𝐢𝐝𝐠𝐞. ➤ 𝐓𝐡𝐞 𝐈𝐧𝐭𝐞𝐫𝐬𝐞𝐜𝐭𝐢𝐨𝐧 𝐨𝐟 𝐂𝐨𝐦𝐩𝐚𝐭𝐢𝐛𝐢𝐥𝐢𝐭𝐲 Java 8 is the last version that reliably compiles ancient Java 1.5 code while still running natively on modern ARM64 (Apple Silicon) hardware. It understands the past but lives in the present. ➤ 𝐓𝐨𝐨𝐥𝐢𝐧𝐠 𝐚𝐬 𝐚 𝐒𝐭𝐫𝐚𝐧𝐠𝐥𝐞𝐫 𝐅𝐢𝐠 By targeting Java 8, you can wrap old Ant builds in modern Gradle 7.6 wrappers. This allows you to modernize your CI/CD pipeline without changing a single line of business logic yet. ➤ 𝐒𝐭𝐚𝐛𝐢𝐥𝐢𝐳𝐞 𝐅𝐢𝐫𝐬𝐭, 𝐌𝐨𝐝𝐞𝐫𝐧𝐢𝐳𝐞 𝐒𝐞𝐜𝐨𝐧𝐝 Use Java 8 to fix your infrastructure (Docker) and your tests. Only once you have a "Green Build" on modern hardware should you attempt to move to Java 17 or 21. In refactoring, the fastest way forward is often a calculated step back to a stable baseline. Full article: https://lnkd.in/e6udWnaB 𝑯𝒆𝒍𝒑𝒇𝒖𝒍 𝑹𝒆𝒔𝒐𝒖𝒓𝒄𝒆𝒔 - 𝘖𝘳𝘢𝘤𝘭𝘦 𝘑𝘢𝘷𝘢 𝘚𝘌 𝘚𝘶𝘱𝘱𝘰𝘳𝘵 𝘙𝘰𝘢𝘥𝘮𝘢𝘱 https://lnkd.in/eebFfMVs - 𝘎𝘳𝘢𝘥𝘭𝘦 𝘛𝘰𝘰𝘭𝘤𝘩𝘢𝘪𝘯 𝘋𝘰𝘤𝘶𝘮𝘦𝘯𝘵𝘢𝘵𝘪𝘰𝘯 https://lnkd.in/eJb2mHUj - 𝘛𝘩𝘦 𝘚𝘵𝘳𝘢𝘯𝘨𝘭𝘦𝘳 𝘍𝘪𝘨 𝘗𝘢𝘵𝘵𝘦𝘳𝘯 𝘣y Martin Fowler https://lnkd.in/ecPh-Kzy #Java #LegacyCode #SoftwareArchitecture #Refactoring #Modernization #Programming
Yeah smallest step to latest'ish tooling > get all the things working - bring it into the current, done similar with Ant to Gradle in the mix in the past with similar era java, thankfully the 'Big Ball Of Mud' in this instance was blessed with comprehensive test coverage across the critical path which made things 10x easier.
Java 8 to 9 is likely where your biggest breaking changes will be. 9 to 17 is relatively painless.
I would say , skip 21 and go straight to 25. Thread pinning issues finally solved in 25.
What's this? A post on LinkedIn about technology with no mention of AI? 😆
Staying with Java 8 means unpatched CVEs. Java 17 is the new norm now. Working with anything less than 17 will be a red flag nowadays.