🔧 ProgrammierungI Tried This Rust Tool, and It Immediately Made Bash Modern(05.09.2026 um 11:25 Uhr)
🪟 Windows TippsA Clanker Pitted Fedora Against Windows 11. Fedora Won, Mostly(07.09.2026 um 18:33 Uhr)
🔧 ProgrammierungOmarchy Linux Quiz(10.09.2026 um 08:56 Uhr)
🪟 Windows TippsBottles' Founder Has Managed to Run Microsoft 365 on Linux(11.09.2026 um 13:59 Uhr)
🪟 Windows TippsChina Switching from Windows to Linux(24.08.2026 um 22:16 Uhr)
🔧 ProgrammierungI Tried This Rust Tool, and It Immediately Made Bash Modern(05.09.2026 um 11:25 Uhr)
🪟 Windows TippsA Clanker Pitted Fedora Against Windows 11. Fedora Won, Mostly(07.09.2026 um 18:33 Uhr)
🔧 ProgrammierungOmarchy Linux Quiz(10.09.2026 um 08:56 Uhr)
🪟 Windows TippsBottles' Founder Has Managed to Run Microsoft 365 on Linux(11.09.2026 um 13:59 Uhr)
🪟 Windows TippsChina Switching from Windows to Linux(24.08.2026 um 22:16 Uhr)

🔧 Programmierung 🕛 vor 3 Monaten 4 Min Lesezeit
0

I built a Claude Code skill that scores your legacy Java code 1–100 and modernizes it to Java 21

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht




The problem with Java 8 → Java 21 migrations



If you're working on a Java 8 codebase — or trying to break into banking and legacy system roles — this article is for you. Every Java 8 codebase has the same problems. You know they exist, but finding and fixing them across 50,000 lines is slow:





  • double for monetary values → silent FX
    precision loss in production

  • Unguarded order.getCounterparty().getAccount(
    ).getBalance()
    → NPE in settlement


  • synchronized HashMap → race conditions under
    concurrent trade load


  • Executors.newFixedThreadPool(200)
    bottleneck at peak volume

  • 60-line DTOs with manual equals/hashCode →
    noise hiding domain logic






What I built



A two-skill Claude Code plugin that acts as a

Senior Java Architect:



Skill 1 — /java-modernization-review

Analyzes your Java file, saves a full report to

analysis.md, and stops.

You review it before any code is touched.



Skill 2 — /java-modernization-implement

Reads analysis.md, applies every change,

writes *Modern.java alongside

the original. Never overwrites your file.





The scoring system



Every review produces a Before/After score

across 9 dimensions (100 points total):



## Scoring breakdown (100 points total)



🔴 NPE prevention — 15 pts

🔴 Monetary precision (BigDecimal) — 15 pts

🔴 Thread safety — 15 pts

🟡 Streams & collections — 10 pts

🟡 Exception handling — 10 pts

🟡 Modern data carriers (Records) — 10 pts

🟡 Concurrency model (virtual threads) — 10 pts

🟡 Modern Java features — 10 pts

🟢 Financial domain rules — 5 pts





Real example: TradeProcessor.java




Legacy code the skill flagged as critical:







CODE
// C1 — NPE: any of these can be null
return order.getCounterparty().getAccount().getB
alance();







CODE
 // C2 — Precision loss on every FX trade
double total = 0.0;
total += t.getAmount() * t.getFxRate();







CODE
  // C2 — Precision loss on every FX trade
double total = 0.0;
total += t.getAmount() * t.getFxRate();







CODE
 // C3 — Race condition on position updates
private HashMap<String, Double> positionMap = new HashMap<>();
public synchronized void updatePosition(String cp, double delta) {
Double current = positionMap.get(cp);
positionMap.put(cp, current == null ? delta : current + delta);
}







CODE
// C4 — Swallowed settlement failure
} catch (Exception e) {
// TODO: handle later
}






After /java-modernization-implement:




CODE
  // C1 fixed — Optional chain, no NPE possible
public BigDecimal getCounterpartyBalance(Order order) {
return Optional.ofNullable(order)
.map(Order::getCounterparty)
.map(Counterparty::getAccount)
.map(Account::getBalance)
.orElseThrow(() -> new IllegalArgumentException("Account balance unavailable"));
}








CODE
  // C2 + C3 fixed — BigDecimal stream + lock-free map
private final ConcurrentHashMap<String, BigDecimal> positionMap = new
ConcurrentHashMap<>();
public void updatePosition(String counterparty, BigDecimal delta) {
positionMap.merge(counterparty, delta, BigDecimal::add);
}







CODE
// Java 21 — virtual threads
private final ExecutorService executor = Executors.newVirtualThreadPerTaskExecutor();







Score: 3/100 → 95/100 (+92 points)




What it covers — every Java release from 9 to 21





  • Priority 1 — Streams, Optional, method references

  • Priority 2 — var, helpful NPE messages, built-in HTTP client (Java 9–11)

  • Priority 3 — Records, sealed classes, pattern matching, text blocks (Java 12–16)

  • Priority 4 — Virtual threads, structured concurrency, lock-free atomics (Java 17–21)

  • Priority 5 — String templates, type inference improvements (Java 18–21)

  • Priority 6 — Date→java.time, StringBuffer→StringBuilder, reactive→virtual threads

  • Priority 7 — Module system (module-info.java)





Two-step workflow — review before any code changes




Step 1 — /java-modernization-review

→ Analyzes file

→ Saves analysis.md

→ Stops and waits for your approval



Step 2 — /java-modernization-implement

→ Reads analysis.md

→ Applies every change

→ Writes *Modern.java (original untouched)

→ Prints final score + delta






Install in Claude Code




  • /plugin marketplace add Santoshrt999/Java-Claude-Skills

  • /plugin install java-claude-skills@java-modernization-review

  • /plugin install java-claude-skills@java-modernization-implement

  • /reload-plugins



Full source code and the TradeProcessor example are in the repo:

👉





GitHub logo



Claude Code skill: review and modernize legacy Java 8 code to Java 21 with AI. Generates a 1-100 score. Specialized for financial systems.







Java Claude Skills — Java 8 → Java 21 Modernization for Claude Code





AI-powered Java code modernization skill for






  1. Again, if you're working on a Java 8 codebase — or trying to break into banking and legacy system roles — this repo is built for you.


  2. The financial domain examples are intentional: trade processors, FX arithmetic, position maps, settlement logic. That's the code you'll actually face in banking interviews and on the job. Practice modernizing it here before you touch production.


  3. Curious what scores you're seeing on your own codebases. Drop them in the comments.


Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
1 Quelle
New Linux “Steal Governor” Targets CPU Contention in Overcommitted Virtual Machines
1 Quelle
I Tried This Rust Tool, and It Immediately Made Bash Modern
1 Quelle
Switzerland's Federal Government is Replacing Microsoft on 3,000 Computers
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten I built a Claude Code skill that scores your legacy Java code 1–100 and modernizes it to Java 21

Thematisch verwandte Begriffe: built, Claude, Code, skill · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...