Changelog for Groovy 5.0.0-beta-1

Bug

  • [GROOVY-3908] - groovyc should enforce correct usage of "continue"
  • [GROOVY-4721] - variable declared in try block is in scope in finally block
  • [GROOVY-4843] - Mocking a method with byte[] parameter type throws a ClassCastException: ArrayList cannot be cast to Number
  • [GROOVY-7439] - Compilation errors using groovy trait and @CompileStatic and @Slf4j("LOG")
  • [GROOVY-8560] - Spread operator type conversion error
  • [GROOVY-8657] - Resource variable is accessible from finally block
  • [GROOVY-9530] - Groovy compiler inlines constants from precompiled classes when it's not safe to do so
  • [GROOVY-9742] - GroovyClassLoader.parseClass() StampedCommonCache.getAndPut() hang *
  • [GROOVY-11182] - Primitive array Varargs Java incompatibility
  • [GROOVY-11486] - DGM flatten return type is often incorrect
  • [GROOVY-11549] - False positive "Can't have an abstract method in a non-abstract class." when implement Java interfaces
  • [GROOVY-11550] - False negative "name clash" when method in child class changes a type argument
  • [GROOVY-11559] - BUG! exception in phase 'instruction selection' of @CompileStatic method
  • [GROOVY-11560] - Invalid compiler error for class which overrides a method having duplicate default definitions from interfaces
  • [GROOVY-11562] - final class property is not reported as final in its MetaProperty#modifiers
  • [GROOVY-11563] - CompileStatic does not detect type mismatch on "+="
  • [GROOVY-11564] - SC: call site writer makes reference to removed method
  • [GROOVY-11565] - empty if/else seems to confuse the parser
  • [GROOVY-11567] - Field transform does not handle closure or anonymous class in assert, return, etc.
  • [GROOVY-11568] - Call to private method fails when using Custom MetaClass
  • [GROOVY-11570] - Groovy 4/5 not working in OSGi container
  • [GROOVY-11572] - STC: spread on non-iterable type causes compiler error
  • [GROOVY-11579] - Reproduction of GROOVY-11548 with Generic Parameters
  • [GROOVY-11581] - byte array casted to array list when calling parent method from nested class
  • [GROOVY-11585] - instanceof with parameterized type
  • [GROOVY-11591] - safe call evaluates arguments
  • [GROOVY-11595] - for loop variable modifiers
  • [GROOVY-11597] - STC: element type of enum class
  • [GROOVY-11600] - Static compiler should treat inner records as static
  • [GROOVY-11607] - Nested <src> in <groovyc> Ant task is not handled nicely
  • [GROOVY-11611] - Calls to the outer class's super from an inner class does not work
  • [GROOVY-11614] - Enums in switch/case statements that are not fully qualified will cause a groovy compile error but Java requires enums to "not" be fully qualified
  • [GROOVY-11616] - Functions that take var args will default the type of the first argument, java tries to find the common parent type from all arguments
  • [GROOVY-11621] - Assigning null to a List or Map using bracket notation does not work with @CompileStatic
  • [GROOVY-11623] - Default values for array members in annotations
  • [GROOVY-11624] - Unable to use statically imported const string in annotation
  • [GROOVY-11627] - Compile Error when private and public functions use same name in compile static mode
  • [GROOVY-11630] - Extraneous bytecode generated after calls to void DGM methods
  • [GROOVY-11639] - interface extends interface and uses static field in default method
  • [GROOVY-11642] - source offset of inner class declaration with annotation
  • [GROOVY-11663] - STC: trait extends trait and tries to use static field
  • [GROOVY-11667] - GPathResult and attribute syntax within inner class
  • [GROOVY-11671] - Groovy 4_0_X branch fails
  • [GROOVY-11674] - Grails reproducible build

Dependency upgrade

Improvement

  • [GROOVY-11573] - Propagate parameters flag from compiler configuration to javac
  • [GROOVY-11577] - Add withIndex/indexed methods for ArrayGroovyMethods
  • [GROOVY-11596] - Additional DGM lazy iterator methods
  • [GROOVY-11599] - Make DGM#chop(Iterator, int...) lazy *
  • [GROOVY-11602] - Add DGM#toTuple(Map.Entry)
  • [GROOVY-11604] - Add returnEarly boolean variant for DGM#chop *
  • [GROOVY-11606] - Lazy findAll, collect, collectMany
  • [GROOVY-11619] - Replace buildscan-recipes with simplified custom value generation
  • [GROOVY-11647] - Change return type of DGM#findIndexValues(Iterator) methods *
  • [GROOVY-11658] - Groovyc ant task is excessively verbose
  • [GROOVY-11668] - Groovydoc fails to produce documentation for some files with higher Java language level code
  • [GROOVY-11669] - SC: class method reference
  • [GROOVY-11673] - Add an explicit mention of selected license for JavaParser for BIN/SDK.

New Feature

  • [GROOVY-10683] - Consider enhancing for loop to provide access to loop index or iterator
  • [GROOVY-11229] - Support instanceof variable
  • [GROOVY-11586] - Provide an injectAll DGM method
  • [GROOVY-11603] - Add Lazy generators for iterators
  • [GROOVY-11636] - Create SGM#next/previous methods which act like next/previous but also takes an integer repeat count
  • [GROOVY-11643] - Add column, eachColumn to AGM
  • [GROOVY-11649] - Create partitionPoint extension method variants
  • [GROOVY-11650] - Create drain extension method for Queues
  • [GROOVY-11653] - Create DGM#sort(List) and AGM#sort(T[]) variants that take an IntRange
  • [GROOVY-11654] - Create AGM#putAt variants
  • [GROOVY-11656] - Create SGM#getLength methods for StringBuilder/StringBuffer

Task

* potentially breaking change (read issue for details - even minor differences are sometimes flagged as potentially breaking changes)