Introduction Java 8 introduced a fundamentally different programming model. The features — lambdas, streams, Optional, CompletableFuture — interact with each other in ways that produce clean, readable code when used correctly and confusing, brittle code when used incorrectly. This article consolidates the most important production-ready guidance from across the series into a single reference, along with the migration checklist for moving a Java 7 codebase to Java 8. Streams Best Practices Do: Use streams for transformations and aggregations // Good: filter → transform → collect List<String> premiumNames = customers.
Continue reading »Migration
8 posts in this section
JDK Encapsulation and Removed APIs (JEP 403, 306, 407, 411): What It Means for Your Code
Overview Java 17 includes several platform changes that can break existing code during migration. This article covers four JEPs that affect compatibility: JEP Change Impact 403 Strongly Encapsulate JDK Internals HIGH — breaks libraries using internal APIs 407 Remove RMI Activation LOW — niche feature, deprecated since Java 15 411 Deprecate Security Manager MEDIUM — some applications use SecurityManager 306 Restore Always-Strict Floating-Point LOW — affects numeric edge cases JEP 403: Strongly Encapsulate JDK Internals What Changed In Java 8 and earlier, code could access any JDK internal API via reflection — setAccessible(true) bypassed access controls.
Continue reading »Migrating to Java 11: From Java 8 — Step by Step
Migration Overview Migrating from Java 8 to Java 11 is the most common Java upgrade scenario. The migration has two distinct phases: Make it compile and run — fix incompatibilities introduced by Java 9–11 Modernise the code — adopt var, List.of(), String.isBlank(), and other new APIs Phase 1 is mandatory and blocks the upgrade. Phase 2 is optional and can happen incrementally. This guide focuses entirely on Phase 1. The 10-Step Migration Checklist [ ] 1.
Continue reading »Migrating to Java 17: From Java 8 and Java 11 — Step by Step
Why Migrate to Java 17? Java 17 is the current recommended enterprise LTS. Key reasons to migrate now: Spring Boot 3.x requires Java 17 — the entire Spring ecosystem is moving here Java 11 extended support ends around 2026 depending on your vendor Java 8 mainstream support ended in 2019; extended support ended 2030 for Oracle JDK but active vulnerability exposure is increasing Language features: Records, Sealed Classes, Text Blocks, Pattern Matching, Switch Expressions — all available in Java 17 Security: Strong JDK encapsulation closes years of internal API exposure used in exploits Recommended Migration Path Java 8 → Java 11 → Java 17 Do not jump directly from Java 8 to Java 17 in one step if your codebase is large or has many third-party dependencies.
Continue reading »Migrating to Java 21: From Java 8, 11, and 17 — Step by Step
Why Migrate Now? Java 21 is the current Long-Term Support (LTS) release, and it is the most feature-rich LTS since Java 8. LTS releases receive security patches and bug fixes for years. Java 11, the previous widely-used LTS, reached its extended support window end depending on your vendor. Java 8 mainstream support ended in 2019. More concretely, Java 21 brings: Virtual Threads — drop-in replacement for platform threads, enabling massive concurrency without reactive rewrites Pattern Matching for switch and records — eliminating entire categories of verbose, error-prone instanceof/cast chains Sequenced Collections — a unified API for ordered collection types Generational ZGC — sub-millisecond GC pauses at any heap size These are not incremental improvements.
Continue reading »Removed and Deprecated APIs: Java EE, JavaFX, Nashorn (JEP 320, 335, 336)
Removal Timeline API Deprecated In Removed In JEP Java EE modules (JAXB, JAX-WS, etc.) Java 9 Java 11 JEP 320 JavaFX Bundled with Java 9 Unbundled in Java 11 — Nashorn JavaScript Engine Java 11 Java 15 JEP 335 Pack200 tools and API Java 11 Java 14 JEP 336 javah tool Java 9 Java 10 JEP 313 sun.misc.BASE64Encoder/Decoder Java 8 Java 11 Encapsulation Thread.destroy(), Thread.stop(Throwable) Old Java 11 — Applet API Java 9 Java 17 JEP 289 Java EE Modules Removed (JEP 320) The six Java EE modules that shipped with Java SE 6–10 were removed from Java 11.
Continue reading »Migrating from Spring Boot 3.x to 4.0
Migrating from Spring Boot 3.x to 4.0 is straightforward if you’ve kept up with deprecation warnings. This guide walks through every step — from dependency updates to API changes — with before/after examples. Pre-Migration: Fix Boot 3 Deprecations Before bumping the version, fix all deprecation warnings in your current Boot 3.x project. Every deprecated API in Boot 3 is removed in Boot 4. In IntelliJ IDEA: Analyze → Code Cleanup with “Remove deprecated usages” enabled.
Continue reading »Spring Boot 2.x → 3.x → 4.x Migration: The Definitive Checklist
Many teams are still running Spring Boot 2.7.x. Spring Boot 2.x reached end of life in November 2023, which means no more security patches. The jump to 4.0 is two generations, and the breaking changes are real — but they are also well-documented and mostly automatable. This guide walks through the migration in stages: 2.x → 3.0 first, then 3.x incremental updates, then 4.0. Each section lists what breaks and how to fix it.
Continue reading »