Groovy 5.0.8
Groovy 5.0.8 has landed — 58 commits of polish, patches, and dependency refreshment. Nothing flashy, but the trait fixes alone make this one worth the upgrade. Let us rap through the release.
Trait Troubles Tamed
Static trait methods were the villain of this cycle. Overrides on trait implementers were silently ignored when called via this inside a trait body (GROOVY-11985, GROOVY-12093), the static type checker could not resolve inherited static trait methods from sub-trait bodies (GROOVY-12106), and resolution turned out to be transform-order dependent (GROOVY-12117). All fixed, with a dispatch behaviour matrix test added so it stays fixed.
Truth Be Told
GROOVY-11996 delivers a new system property: groovy.truth.file.exists.enabled. Set it to false and file-truthiness reverts to the Groovy 4 behaviour. Old projects with subtle if (file) logic can breathe again.
Builder Back to Runtime
GROOVY-12040 restores @Builder retention to RUNTIME in the 5.0.x line. Frameworks doing reflective annotation lookups on builders were left staring at nothing; now they see the annotations again.
Bug Bashes & Bytecode Boosts
- Map membership flip — GROOVY-9848 changes
inon maps from value-truthy to key-based (partial backport). Check anykey in mapchecks that relied on truthy values. - Varargs vindicated — vararg-of-arrays argument wrapping no longer fails under classic compilation (GROOVY-12139).
- Locale.ROOT round-up —
toEnumfallbacks,containsIgnoreCase, and DataSet table name folding all useLocale.ROOTnow (GROOVY-12055). No more Turkish-I surprises. - Decompiler fidelity —
AstNodeToScriptAdapterrendering is more faithful (GROOVY-12144), and reflection calls are ordered so annotation members stay stable (GROOVY-12146). - Grape regression fixed — the grape directory name regression is resolved, and backslashes are rejected in Ivy coordinate validation.
- Dependency dance — Jackson 2.21.4, ASM 9.10.1, SLF4J 2.0.18, javaparser 3.28.2, JNA 5.19.1. Fresh and shiny.
Should You Ship It?
If you use traits with static methods or @Builder in a framework context — yes, upgrade now. If you are on a stable 5.0.7 and none of this rings a bell, the dependency bumps alone are a decent reason to move before the next security advisory forces the issue.
Grab the release from groovy.apache.org or your favourite package manager. Upgrade, run your tests, and enjoy the calm.