Changelog for Groovy 6.0.0-alpha-2
Bug
- [GROOVY-11807] - MapWithDefault can break type safety of key set
- [GROOVY-11985] - Static method override on trait implementer ignored when called via this in trait body
- [GROOVY-11987] - groovydoc CLI fails with "Unsupported Java Version: false" when --javaVersion omitted
- [GROOVY-11994] - GEP-16: Missing groovy.val.enabled flag
- [GROOVY-11999] - ProxyGeneratorAdapter NPE when proxy interfaces mix bootstrap and user classloaders
- [GROOVY-12009] - StringGroovyMethods#stripIndent(boolean) doesn't handle non-String cases as advertised *
- [GROOVY-12022] - deprecate IndyStaticTypesMultiTypeDispatcher
- [GROOVY-12024] - Subscript operator for Map has unexpected behavior when key is 'properties'
- [GROOVY-12040] - restore @Builder retention to RUNTIME in 5.0.x
- [GROOVY-12045] - Calling an enclosing-class instance method on a static nested class instance throws IllegalArgumentException instead of MissingMethodException
- [GROOVY-12046] - MissingMethodException reports the metaclass theClass (a supertype) instead of the receiver's runtime class, breaking the GroovyObject.invokeMethod MOP fallback
- [GROOVY-12058] - ClassNodeUtils.getPropNameForAccessor should use JavaBeans decapitalization to match runtime property naming *
- [GROOVY-12059] - groovy-contracts: support nested closures in contract annotations
- [GROOVY-12062] - OptimizingStatementWriter __$stMC slow branch resolves a try-block local as getProperty when the method has a non-empty finally (classic non-indy codegen) - regression in 5.0.x
- [GROOVY-12066] - @Invariant on a static nested class without an explicit constructor fails compilation with "BUG! exception in 'instruction selection' ... statement is null
- [GROOVY-12067] - IntRange.containsWithinBounds delegates to contains, breaking the continuous-bounds contract *
- [GROOVY-12071] - groovy-contracts: ContractClosureWriter strips generics from closure parameters
- [GROOVY-12072] - groovy-contracts: loop invariant doesn't run static import visitor
- [GROOVY-12073] - reject dot-dot segments in grape coordinate validation
- [GROOVY-12074] - decode yaml/toml/csv/markdown input streams as utf-8
- [GROOVY-12079] - groovy-contracts: @Ensures postcondition silently dropped for braceless if return (and under @TailRecursive)
- [GROOVY-12080] - RegexChecker crashes on inline pattern (~/.../) as .matcher() receiver
- [GROOVY-12082] - groovy-contracts: @Ensures postcondition silently dropped for method with empty body
- [GROOVY-12083] - groovy-contracts: only the first @Ensures on a method fires
- [GROOVY-12084] - groovy-contracts: @Synchronized method with @Ensures/@Invariant but no @Requires throws ClassCastException (SynchronizedStatement → BlockStatement)
- [GROOVY-12085] - SourceText slices UTF-16 with code-point AST columns, truncating source for supplementary characters *
- [GROOVY-12089] - Groovy 5 ClassNode.getGetterMethod() can clone a getter with a null exceptions array when @Entity and @Sortable are combined
- [GROOVY-12091] - Regression in Groovy 5: bounded generic trait property setter remains abstract in implementing class
- [GROOVY-12093] - Static method override on trait implementer ignored when called via this in trait body (cont'd)
- [GROOVY-12097] - a[index] = expr evaluates RHS before index, breaking left-to-right evaluation order *
- [GROOVY-12098] - Pre/post increment on array element double-evaluates the receiver
- [GROOVY-12099] - Elvis-assignment on array element evaluates receiver and index twice
- [GROOVY-12101] - return BigInteger for json integers beyond long range
- [GROOVY-12102] - escape namespace URI in XmlNodePrinter.printNamespace
- [GROOVY-12104] - Trait body with T.this.* qualifier produces VerifyError (4.x) / ClassCastException (5.x/6.x) — should be a compile error
- [GROOVY-12105] - Unqualified super.m(...) from a static trait method throws MissingMethodException — should be a compile error or walk the trait chain
- [GROOVY-12106] - STC cannot resolve inherited static trait method from sub-trait body
- [GROOVY-12107] - reject non-hex characters in decodeHex
- [GROOVY-12117] - Resolution of inherited static trait method from sub-trait body is transform-order dependent
- [GROOVY-12119] - JmxBuilder: connector environment map is discarded
Dependency upgrade
- [GROOVY-11989] - Bump com.github.javaparser:javaparser-core: 3.28.0 → 3.28.1
- [GROOVY-11990] - Bump jackson to 2.21.3
- [GROOVY-11991] - Bump jline to 4.0.14
- [GROOVY-11992] - Bump org.apache.maven.resolver:maven-resolver-supplier-mvn4: 2.0.16 → 2.0.17
- [GROOVY-12001] - Bump jline to 4.1.0
- [GROOVY-12006] - Bump gradle to 9.5.1 (build)
- [GROOVY-12007] - Bump log4j2 version to 2.26.0 (test dependency)
- [GROOVY-12014] - Bump asm to 9.10
- [GROOVY-12047] - Bump asm to 9.10.1
- [GROOVY-12048] - Bump jline to 4.1.3
- [GROOVY-12049] - Bump maven-resolver-supplier-mvn4 to 2.0.18
- [GROOVY-12050] - Bump slf4j to 2.0.18
- [GROOVY-12051] - Bump jackson to 2.21.4
- [GROOVY-12056] - Bump javaparser to 3.28.2
- [GROOVY-12075] - Bump jackson/jackson-databind to 2.20.0
- [GROOVY-12076] - Bump logback to 1.5.34 (test dependency)
- [GROOVY-12077] - Bump JUnit to 6.1.0
- [GROOVY-12086] - Bump jna to 5.19.1
- [GROOVY-12087] - Bump reactor to 3.8.6
- [GROOVY-12088] - Bump com.github.jk1.dependency-license-report.gradle.plugin to 3.1.4
- [GROOVY-12090] - Bump spotbugs to 4.10.2
- [GROOVY-12094] - Bump jline to 4.2.1
- [GROOVY-12110] - Bump commonmark to 0.29.0
- [GROOVY-12114] - Bump logback to 1.5.37 (test dependency)
Improvement
- [GROOVY-9848] - Change map membership (in) from value-truthy to key-based *
- [GROOVY-10156] - Unreachable bytecode in switch statement
- [GROOVY-11988] - Add support for {@inheritDoc} in external JDK classes
- [GROOVY-11993] - Support serializable method reference
- [GROOVY-11995] - groovyc ant task could support passing through system properties or jvmargs
- [GROOVY-11996] - Provide a groovy.truth.file.exists.enabled system property which when false reverts to Groovy 4 behavior
- [GROOVY-11997] - Add @ForkedJvm JUnit extension to groovy-test-junit6
- [GROOVY-11998] - Better support of intersection types
- [GROOVY-12002] - add MarkdownSlurper support to groovysh
- [GROOVY-12003] - Add /img command to groovysh for inline image and chart display
- [GROOVY-12004] - grape command line tool should accept maven/ivy shorthands
- [GROOVY-12005] - Harden Grape against cache corruption and CDN throttling
- [GROOVY-12010] - Graduate groovy-toml from incubating to stable
- [GROOVY-12011] - groovy-csv: clarify when dates can retain rich types vs when handled as Strings
- [GROOVY-12012] - groovy-yaml: clarify when dates can retain rich types vs when handled as Strings
- [GROOVY-12017] - Tuple equals should follow Groovy's List equals semantics
- [GROOVY-12018] - allow format to be case insensitive for groovysh: /print -s FORMAT
- [GROOVY-12025] - Provide a JavaShell compileAllTo method
- [GROOVY-12028] - Add JDK27 constants
- [GROOVY-12033] - groovy.concurrent.Actor: pre-GA hardening — Stop sentinel, error callback, bounded mailbox, per-actor pool
- [GROOVY-12034] - Apply "fat-free lambda" patterns to Groovy — DGM `*With` family + `curryWith` helper
- [GROOVY-12035] - Avoid emitting unreachable GOTO in if/else bytecode generation
- [GROOVY-12036] - GDK: cache Collectors instances in StreamGroovyMethods and ParallelCollectionExtensions
- [GROOVY-12052] - groovy-contracts @Ensures could support static methods
- [GROOVY-12053] - groovy-contracts loop @Invariants and @Decreases fail under @TypeChecked
- [GROOVY-12055] - Assess toLower/UpperCase calls which should use Locale.ROOT
- [GROOVY-12060] - groovy-contracts could support @Decreases at the method level
- [GROOVY-12061] - Develop a threat model for Groovy
- [GROOVY-12064] - Provide a maximum depth threshold for parsing deeply nested JSON documents
- [GROOVY-12069] - Make MethodHandles available for DGM
- [GROOVY-12070] - Groovy could provide DGM/ADM isSorted variants (int[] and long[] variants)
- [GROOVY-12078] - support old parameter values in @Ensures postconditions (incl. static methods)
- [GROOVY-12081] - RegexChecker doesn't support String.matches(Pattern|String)
- [GROOVY-12092] - Allow a "groovy.indy.callsite.cleaner.inline" flag to turn off the PIC-Cleaner thread
- [GROOVY-12096] - Replace qdox with javaparser
- [GROOVY-12100] - provide Closure variants for AGM primitive each
- [GROOVY-12103] - XML markup builders don't reject PI/comment terminators in all output paths
- [GROOVY-12108] - Provide a more informative error message when GROOVY_HOME is not set correctly
- [GROOVY-12109] - Harden Closure deserialization against owner/delegate reference cycle
- [GROOVY-12111] - expose Trait static members on the generated trait interface
- [GROOVY-12112] - Reject qualified Trait.m() to a @Virtual trait static with a clear compile error
- [GROOVY-12116] - Provide a small, read-only, fluent query API over the Groovy AST
- [GROOVY-12118] - Further harden sql injection protection *
- [GROOVY-12120] - FactorySupport: log a warning when an XML parser security feature cannot be set
New Feature
- [GROOVY-12013] - New optional type checking extension: CombinerChecker to verify associative combiners in injectParallel/sumParallel/Stream.reduce
- [GROOVY-12015] - Provide a nested copyWith capability
- [GROOVY-12016] - New GDK methods: zipWithNext and groupConsecutive
- [GROOVY-12021] - Add DO macro for monadic comprehensions over Optional/Stream/Awaitable and @Monadic types
- [GROOVY-12031] - Provide a DGM#takeIf method
- [GROOVY-12032] - Provide a DGM clamp method
- [GROOVY-12037] - GDK: add toMutableList/toImmutableList/toImmutableSet variants and deprecate toList(Stream) shim
- [GROOVY-12038] - Graduate groovy-contracts from incubating to stable
Sub-task
- [GROOVY-12043] - Provide curryWith helpers
- [GROOVY-12044] - CurriedClosure per-element allocation
- [GROOVY-12054] - A preliminary set of "fat-free" DGM methods
Task
- [GROOVY-12008] - Sealed types: graduate from incubating status
- [GROOVY-12026] - Graduate JavaShell from incubating to stable
- [GROOVY-12027] - Align CompilerConfiguration with JDK17 minimum
- [GROOVY-12029] - Graduate Macro and related classes from incubating to stable
- [GROOVY-12030] - Graduate PropertyHandler from incubating to stable
- [GROOVY-12039] - Graduate RegexChecker and FormatStringChecker from incubating to stable
- [GROOVY-12042] - Graduate groovy-ginq from incubating to stable
* potentially breaking change (read issue for details - even minor differences are sometimes flagged as potentially breaking changes)