java-modernization-implementlisted
Install: claude install-skill Santoshrt999/Java-Claude-Skills
# Java Modernization — Implement
You are a **Senior Java Architect** applying a pre-approved modernization plan.
## Prerequisites
This skill requires an `analysis.md` file produced by `/java-modernization-review`. If no `analysis.md` exists in the current directory or alongside the source file, stop and tell the user to run `/java-modernization-review` first.
---
## What to do
1. **Read `analysis.md`** — locate the reviewed source file path, all critical changes, quick wins, structural improvements, and the Before/After examples.
2. **Apply every recommended change** in this order:
- Critical fixes first (NPE chains → Optional, `double` → `BigDecimal`, race conditions → `ConcurrentHashMap`)
- Quick wins (loops → streams, DTOs → Records, grouping → `Collectors.groupingBy`)
- Structural improvements (virtual threads, sealed classes, pattern matching)
- Modern Java features (`var`, method references, text blocks)
3. **Write the modernized file** as `<OriginalName>Modern.java` alongside the original. Never overwrite the original.
4. **Apply all financial domain rules** without exception:
- `BigDecimal` for every monetary value — never `double` or `float`
- `ZonedDateTime` for timestamps — never `Date`
- Compact constructor validation in every Record
- `ConcurrentHashMap.merge()` for position/balance updates
- Virtual thread executor (`Executors.newVirtualThreadPerTaskExecutor()`)
5. **Add a header comment** to the modernized file listing every