Changelog for Groovy 4.0.0-alpha-1

Bug

  • [GROOVY-4945] - Incorrect "Possible solutions" when calling a method on super in a non-derived class
  • [GROOVY-5103] - groovy compiler ignores import * for static nested classes in java sources
  • [GROOVY-7094] - Semantic of access super fields is not consistent: super.@field == super.field
  • [GROOVY-7232] - Delegation inconsistent between methods and properties in nested closures *
  • [GROOVY-7304] - Cannot mutate private field from within an AIC or a closure
  • [GROOVY-7373] - Interact Closures withing Groovy Trait methods are not recognized by the implementing class
  • [GROOVY-7399] - Method "with()" fails to call on the object reference in Trait
  • [GROOVY-7512] - Cannot call Trait method from Closure when using static compilation
  • [GROOVY-7549] - java.lang.IllegalAccessError occurs when attempting to run code built with CompileStatic
  • [GROOVY-7701] - org.codehaus.groovy.runtime.typehandling.GroovyCastException in Groovy ".with { ... }" - Block
  • [GROOVY-7759] - @Lazy does not work when used in a Trait
  • [GROOVY-7843] - Trait method calling closure cannot be inherited while using CompileStatic
  • [GROOVY-7848] - Closure generic parameters ignored and return types missing from collections methods
  • [GROOVY-8000] - Problem With Trait Generics
  • [GROOVY-8049] - Trait properties with 'with'
  • [GROOVY-8100] - MarkupBuilder cant yield before first tag
  • [GROOVY-8274] - methodMissing not executed when the delegate is an inner class
  • [GROOVY-8284] - getMetaClass should be annotated as (JavaBeans) transient
  • [GROOVY-8707] - += in CompileStatic dynamically sets property instead of using setter
  • [GROOVY-8715] - Cannot resolve array of inner class from type in same package (no import)
  • [GROOVY-8762] - Invalid this reference in nested class
  • [GROOVY-8774] - Stub generator doesn't handle package-info
  • [GROOVY-8820] - Closure inside trait cannot use Closure's delegate variables
  • [GROOVY-8840] - CLONE - Compile Static causes getAt to fail (advanced cases)
  • [GROOVY-8961] - Cannot pass generic list into explicit setter
  • [GROOVY-8999] - Access to private fields and methods from subclass exhibits strange behavior
  • [GROOVY-9146] - Seems to be a gap in method reference support
  • [GROOVY-9185] - groovyc doesn't keep RetentionPolicy in generated bytecode
  • [GROOVY-9194] - Groovy fails when a script starts with a #
  • [GROOVY-9255] - trait property throws MissingPropertyException when read using qualified super expression
  • [GROOVY-9256] - trait qualified-super expressions fail when inside closure
  • [GROOVY-9310] - Groovy does not ignore second bash directive
  • [GROOVY-9344] - CCE in closure shared variable assignment
  • [GROOVY-9385] - Access to outer class private field from closure leads to ClassCastException (@CompileStatic)
  • [GROOVY-9386] - Field initialized in a trait using tap doesn't work correctly
  • [GROOVY-9387] - Using this.method() in closures inside BuilderSupport subclasses doesn't dispatch properly
  • [GROOVY-9389] - STC regression using increment/decrement operators on custom bean accessors in Groovy 3.0.0
  • [GROOVY-9392] - GroovyClassLoader as system class loader fails in Groovy 3
  • [GROOVY-9396] - Captured arguments in closures are not annotated with @Generated
  • [GROOVY-9398] - GroovyScriptEngine cannot recompile a class that uses generic parameters
  • [GROOVY-9399] - Annotations on annotation methods are missing in the AST
  • [GROOVY-9400] - Regression in end of line handling between 2.5.9 and 3.0.0
  • [GROOVY-9405] - Junit 5 IncompatibleClassChangeError
  • [GROOVY-9409] - org.codehaus.groovy.runtime.callsite.GroovySunClassLoader is unusable
  • [GROOVY-9410] - Writable is not on classpath for compilation when using maven repository
  • [GROOVY-9414] - Groovy 3.0.1 : @Delegate does not work with default getter
  • [GROOVY-9420] - Incorrect type inference on map[key]
  • [GROOVY-9422] - @CompileStatic non-static inner class instantiation in closure
  • [GROOVY-9427] - Regression in GString handling
  • [GROOVY-9429] - Illegal reflective access warnings occurred when getting property
  • [GROOVY-9433] - grammar ambiguity with ternary expression being confused with safe indexing
  • [GROOVY-9448] - Missing throws clause of constructor declaration in java stubs
  • [GROOVY-9449] - Mutliple methods with the same name now fail before AST transformations can fix it
  • [GROOVY-9450] - DefaultGroovyMethods findIndexOf method can't use startIndex
  • [GROOVY-9452] - Multiple Repeatable Annotations Container generated if an explicit container is present and an implicit one required
  • [GROOVY-9454] - STC: regression for instanceof on generic field/property
  • [GROOVY-9455] - STC: no error for if (!(x instanceof T)) x.methodFromT()
  • [GROOVY-9459] - Line number information for automatically inserted return statements quirky
  • [GROOVY-9460] - Groovy 3 Compilation Failure with method with argument Class<?> called with Class<D>
  • [GROOVY-9462] - Groovy 3 BUG! exception in phase 'conversion' in source unit Caused by NullPointerException
  • [GROOVY-9463] - STC: no type check error for invalid method pointer or reference
  • [GROOVY-9465] - GroovyDoc: class-header is not always displayed
  • [GROOVY-9469] - Original exception during global AST transformation no longer preserved in error message
  • [GROOVY-9477] - FastStringServiceFactory SPI loading in OSGi
  • [GROOVY-9480] - New v9 ClassFinder throws NoSuchFileException/UnsupportedOperationException and writes it to stderr
  • [GROOVY-9483] - Console exits when Cancel is clicked on the "Save changes" dialog
  • [GROOVY-9485] - metaclass is not initialized
  • [GROOVY-9489] - package.html files being ignored during javadoc generation when building on JDK9+
  • [GROOVY-9501] - MissingPropertyException for access to private static field from inner class when subclassing
  • [GROOVY-9505] - java.lang.UnsupportedOperationException: This feature requires ASM8 on JDK 14 in Spock tests
  • [GROOVY-9506] - Joint compilation is broken
  • [GROOVY-9507] - JSP style loop in StreamingTemplateEngine template results in TemplateParseException
  • [GROOVY-9508] - groovyConsole CLI plumbing for --enable-preview command-line switch is missing one part
  • [GROOVY-9511] - Annotation spanning lines is not supported by Parrot
  • [GROOVY-9515] - MethodHandle with spread args should not be cached
  • [GROOVY-9516] - Static compiler infers wrong type for implicitly shared variables
  • [GROOVY-9517] - CompileStatic typeCasting runtime error from Class Array to Class List
  • [GROOVY-9518] - Closure argument types not inferred when calling a constructor
  • [GROOVY-9522] - Throwing NPE when I use ternary operator with something special
  • [GROOVY-9526] - Failed to reload classes with generic parameters
  • [GROOVY-9529] - Static type checking сannot choose between Map#getAt(Object) and Object#getAt(String) methods
  • [GROOVY-9543] - groovydoc multiple issues with generics
  • [GROOVY-9546] - Annotations on class signature are rendered incorrectly
  • [GROOVY-9547] - @see tags are not working properly
  • [GROOVY-9548] - groovydoc: properties claim to be "private" and don't show annotations
  • [GROOVY-9554] - @Field variable access within closures broken
  • [GROOVY-9556] - Stub generated without the effect of AST transformation makes joint compilation fail
  • [GROOVY-9558] - Wrong code for putAt on Map that is member of closure delegate
  • [GROOVY-9562] - Base class property causes CCE
  • [GROOVY-9566] - Default import for Proxy is wrong
  • [GROOVY-9567] - groovydoc: abstract methods do not have abstract modifier
  • [GROOVY-9568] - groovydoc: extra default constructor
  • [GROOVY-9569] - SC: new compiler error for access of static, non-final, outer-class field *
  • [GROOVY-9570] - Class-Level Closure Definition With Generics Fails TypeChecked
  • [GROOVY-9571] - groovydoc: annotation definitions, enums, interfaces, and traits have a default ctor
  • [GROOVY-9573] - groovydoc: byte[] shown as [B
  • [GROOVY-9574] - ConcurrentModificationException in Java9.concealedPackageList
  • [GROOVY-9575] - ASTNode.hashCode violates Object.hashCode contract: does not return consistent value
  • [GROOVY-9577] - Order of ModuleNode#getImports() is expected but not guaranteed
  • [GROOVY-9580] - STC: return type checking for generic, covariant property gives false error
  • [GROOVY-9581] - コンパイラで、クロージャから静的クラス変数を参照できない.
  • [GROOVY-9584] - CLONE - Error when creation a variable named "context"
  • [GROOVY-9586] - CLONE - SC: calling trait method inside closure has incorrect receivers data
  • [GROOVY-9587] - Scope of method call changed from non-static to static 2.4->2.5
  • [GROOVY-9588] - groovyCompile 6x slower in 3.0.4 than 2.5.6
  • [GROOVY-9591] - Compiler error for use of variable expression within tap closure
  • [GROOVY-9597] - CompileStatic: @ClosureParams in @DelegatesTo doesn't work
  • [GROOVY-9598] - CompileStatic: Runtime error: Access outer class property from static inner in @DelegatesTo
  • [GROOVY-9600] - Picocli-related VersionProvider helper classes should be public to avoid access warnings
  • [GROOVY-9601] - Parsing text into a class became much slower under Groovy 3.x
  • [GROOVY-9603] - Assignment of Map literal to Map element fails to compile (static)
  • [GROOVY-9604] - STC: method or property missing errors for Closure's getResolveStrategy(), etc.
  • [GROOVY-9605] - leftShift operator does not work on BigInteger (throws UnsupportedOperationException)
  • [GROOVY-9606] - Traits using generics generate incorrect stub for Methods
  • [GROOVY-9607] - Class generation regression in 3.0.5-ss: This method should not have been called
  • [GROOVY-9615] - super.method() can trigger method on outer class in case of missing method
  • [GROOVY-9618] - Property reference resolves to field, not getter when property name is single upper-case letter *
  • [GROOVY-9620] - MetaClassImpl uses findPropertyInClassHierarchy inefficiently
  • [GROOVY-9634] - ClassNode hasPossibleMethod and tryFindPossibleMethod make inefficient use of getMethods(String) and getSuperClass()
  • [GROOVY-9635] - Generic types get mixed up
  • [GROOVY-9642] - Inner interface of parent class unresolved in anon. inner class expression
  • [GROOVY-9643] - Using Spock thrown() method causes IllegalAccessError for 2.0-M2-groovy-3.0 on JDK 8 with noverify switch
  • [GROOVY-9645] - Inconsistencies in JavaBean naming for property access
  • [GROOVY-9647] - Module changes for Groovy 4
  • [GROOVY-9648] - Bad error message when attempting to call a missing constructor
  • [GROOVY-9652] - SC: ClassCastException for comparison to single-character string literal in closure
  • [GROOVY-9653] - SC: ClassCastException on delegate object property set
  • [GROOVY-9654] - should not consider bridge methods when determining whether an overridden method annotated with @Override is valid
  • [GROOVY-9657] - JmxMetaMapBuilder.buildOperationMapFrom throw StringIndexOutOfBoundsException
  • [GROOVY-9658] - Infinite recursion exists in HashCodeHelper#updateHash(int, java.lang.Character)
  • [GROOVY-9661] - Since Groovy 3 ArrayExpression#sizeExpression can suddenly return null
  • [GROOVY-9666] - ConcurrentModificationException with ASTTransformation
  • [GROOVY-9672] - trait conflict resolution not available for static methods
  • [GROOVY-9673] - GroovyCastException when using Trait.super.name = ... with multiple setters
  • [GROOVY-9688] - Groovy 3.0.5 references groovyjarjaropenbeans.BeanInfo (doesn't seem to be included in the distribution) and 3.0.0.rc1 uses java.beans.BeanInfo
  • [GROOVY-9691] - Method call "main" is replaced with StaticMethodCallExpression in script
  • [GROOVY-9692] - Adding extension method 'call' on ArrayList with Closure as a parameter stopped working in 3.0.x
  • [GROOVY-9699] - @CompileStatic does not use bridge methods for keyed map access
  • [GROOVY-9700] - SC: set groovy property written for variable expression assignment that should be direct setter call
  • [GROOVY-9702] - ASTTest annotation has runtime retention and transform removes required member from AST *
  • [GROOVY-9703] - DefaultGroovyMethods.reverse(T[], true) performs extra copy
  • [GROOVY-9704] - The '~' negate operator causes an ASM processing error when static compiled
  • [GROOVY-9706] - Groovy 3.0.5 varargs [Static type checking] - Cannot find matching method
  • [GROOVY-9711] - @Sortable annotation always sorts by the parent properties
  • [GROOVY-9712] - groovyc fails when compiling class starting with unicode character
  • [GROOVY-9717] - 3.0 stubs include packages annotations on classes other than package-info.groovy
  • [GROOVY-9732] - CompareToNullExpression has empty implementation of transformExpression
  • [GROOVY-9735] - STC: incorrect error for actual vs inferred closure parameter type
  • [GROOVY-9739] - NPE in ClassNode.isDerivedFrom while compiling trait with Groovy 3.0.5
  • [GROOVY-9751] - STC: error for addAll with collect argument

Dependency upgrade

Improvement

  • [GROOVY-4694] - Move AstBuilderTransformation Global xForm to separate module
  • [GROOVY-9377] - Support JDK15
  • [GROOVY-9394] - Groovy could provide some minimal methods to assist with migrating between Groovy versions
  • [GROOVY-9408] - Avoid unnecessary looking up default import classes when resolving types
  • [GROOVY-9417] - Make @NullCheck play nicer with @Immutable
  • [GROOVY-9430] - Added support for ScriptEngine.FILENAME behaviour
  • [GROOVY-9447] - Add a parse tree viewer to groovy console
  • [GROOVY-9468] - Support running as Java code in the Groovy console
  • [GROOVY-9473] - Support compiling as Java code in the Groovy console
  • [GROOVY-9478] - Groovy Ant task could support Ant resources
  • [GROOVY-9486] - Remove redundant code `Sentinel`
  • [GROOVY-9487] - Update and check if initialized via same field of metaclass
  • [GROOVY-9492] - Relax groovy.test.NotYetImplemented dependency on JUnit 4's AssertionFailedError *
  • [GROOVY-9504] - Add support for Path to slurper classes
  • [GROOVY-9509] - JavaShell should allow options to be passed
  • [GROOVY-9512] - Control the fallback threshold of indy with different switch
  • [GROOVY-9513] - Enable indy by default
  • [GROOVY-9514] - Remove antlr2 parser
  • [GROOVY-9545] - DGM: add toArray(Class) extension method for java.util.stream.Stream
  • [GROOVY-9549] - groovydoc: implemented interfaces not shown in class description
  • [GROOVY-9576] - groovydoc: $INIT static method shown on Groovy enums
  • [GROOVY-9578] - Also output aborted tests in JUnit 5 GroovyJUnitRunnerHelper
  • [GROOVY-9589] - Parse source codes in parallel
  • [GROOVY-9592] - Replace "groovy.generate.stub.in.memory" with "groovy.mem.stub"
  • [GROOVY-9594] - Rename whitelist/blacklist in SecureASTCustomizer to more meaningful names *
  • [GROOVY-9602] - return more specific type for ifS/ifElseS helper methods in GeneralUtils
  • [GROOVY-9619] - Adjust pom for groovy-test-junit5 so that junit-jupiter-api is compile time not runtime
  • [GROOVY-9631] - Replace legacy data structure with Java collection *
  • [GROOVY-9633] - Improve the doco on the Groovy Console
  • [GROOVY-9637] - Improve the performance of GString
  • [GROOVY-9644] - Add java.io.File to immutable type list
  • [GROOVY-9667] - Tweak ManagedIdentityConcurrentMap for better performance
  • [GROOVY-9669] - Enhance immutability check
  • [GROOVY-9682] - Support coerce for @NamedVariant
  • [GROOVY-9726] - Compile error needed for illegal field modifier combination
  • [GROOVY-9736] - Remove org.objectweb.asm.Opcodes as implemented interface in most (all?) places *
  • [GROOVY-9744] - PropertyNode should be enriched to support getter/setter names
  • [GROOVY-9745] - Provide a way to filter illegal/discouraged characters when using MarkupBuilder
  • [GROOVY-9753] - EqualsAndHashCode should be enhanced to be POJO aware
  • [GROOVY-9756] - MapConstructor generated code should be POJO aware

New Feature

  • [GROOVY-7492] - Groovy should allow CompileStatic classes to not implement GroovyObject
  • [GROOVY-9318] - SecureASTCustomizer: add support for allowing or blocking entire package trees
  • [GROOVY-9365] - Implement JavaShell to run Java code
  • [GROOVY-9384] - Groovy should provide a Maven BOM
  • [GROOVY-9534] - Groovy could provide an AST transform to hook into platform logging (JEP 264)
  • [GROOVY-9671] - Absorb GContracts project into Groovy project
  • [GROOVY-9675] - There should be a mechanism to disable individual macro methods & extension methods
  • [GROOVY-9677] - provide a library of pre-canned macro methods
  • [GROOVY-9680] - Groovy 4 should provide some pre-canned type checker extensions
  • [GROOVY-9684] - We should provide shouldFail/assertScript variants which take a shell
  • [GROOVY-9754] - Provide a record-like equivalent

Task

  • [GROOVY-6843] - Remove GroovyDoc JANSI dependency
  • [GROOVY-9380] - VMPlugin refactor: Coalesce Java5 through Java7 into Java8

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