Baeldung's Java Weekly issue 658 curates the week's top Java and Spring ecosystem content. The headline piece covers virtual threads after JDK 24, including benchmarks, code samples, and Spring Boot 3 adoption guidance. A standout technical read from martinfowler.com quantifies the economic benefit of refactoring in the AI agent era: a 17,155-line data-access layer was refactored, cutting AI agent input tokens by 83% (from 159,564 to 27,360). Also highlighted: IntelliJ IDEA adding LSP support for VS Code and Cursor, the Embabel Agent Framework reaching 1.0, Jakarta Agentic AI's first milestone, and Java transitioning to more frequent security updates. Release roundup includes Quarkus 3.38.1, Jetty 12.1.12, Vert.x 5.1.6, Helidon 4.5.2, and Elasticsearch 9.5.0.
Questions this post answers
What was the measured impact of refactoring on AI agent token usage in a real codebase?
Refactoring a bloated 17,155-line data-access layer reduced AI agent input tokens by 83%, dropping from 159,564 to 27,360 tokens for a representative feature change. The experiment by Giles Edwards-Alexander demonstrates that clean, well-structured code directly lowers the cost and improves the efficiency of agentic AI workflows operating on that codebase. Teams using AI agents on legacy codebases track findings like this on daily.dev before committing to a refactoring strategy.