Changelog for Groovy 4.0.5

Bug

  • [GROOVY-10096] - STC: accepts incorrect program with flow typing
  • [GROOVY-10120] - STC: Guava Multimap#asMap bridge method
  • [GROOVY-10271] - Wrong inference when using ternary operator with closure and variable
  • [GROOVY-10272] - Wrong inference when using ternary operator with lambdas
  • [GROOVY-10356] - STC changes the inferred type of variable in the presence of flow typing
  • [GROOVY-10521] - Compiler complains about abstract method not implemented when implementing trait
  • [GROOVY-10623] - Type mismatch when encountering unconditional flow typing and null
  • [GROOVY-10646] - STC: outer class type parameter inference
  • [GROOVY-10674] - STC crashes when combining use-site variance with bounded polymorphism
  • [GROOVY-10688] - LUB does not work properly when mixing type parameter names and using wildcards
  • [GROOVY-10697] - @ToString throws an NPE for POJO with null field
  • [GROOVY-10698] - Fail to infer the type argument when using nested diamond operator
  • [GROOVY-10699] - Unable to infer type argument from the parameter type of a lambda
  • [GROOVY-10700] - STC cannot locate method specified by interface but supplied by AST transform
  • [GROOVY-10701] - NullPointerException in instruction selection phase when having conditionals with lambdas and function references
  • [GROOVY-10704] - Random order of TraitBridge methods breaks cachability
  • [GROOVY-10705] - ToString order bug for super properties
  • [GROOVY-10709] - Performance regression in Gradle with Groovy 4
  • [GROOVY-10710] - operator == is slow when comparing primitive arrays and lists
  • [GROOVY-10711] - CompileStatic doesn't call asBoolean
  • [GROOVY-10712] - STC: for-each over Iterator fails to infer element type
  • [GROOVY-10720] - Resolving wrong overloaded method?
  • [GROOVY-10725] - Regression in STC related to generics, unknown cause
  • [GROOVY-10731] - Exceptions thrown from MarkupTemplateEngine when map accessors and GString interpolation are used
  • [GROOVY-10733] - Fix illegal access for array clone on JDK16+
  • [GROOVY-10734] - STC doesn't resolve zero-argument method references in nested generics
  • [GROOVY-10737] - Groovydoc deprecation list page is always empty even if @deprecated is used in groovydoc comments on some elements
  • [GROOVY-10741] - STC method pointer or reference to generated property method
  • [GROOVY-10742] - STC permits incorrect void method reference
  • [GROOVY-10744] - STC support assignment of primitives to interface types like Comparable and Serializable
  • [GROOVY-10747] - Fix illegal access for object clone on JDK16+
  • [GROOVY-10748] - logback-classic 1.3.0 and 1.4.0 breaks on Groovy
  • [GROOVY-10749] - STC: closure/lambda/reference parameter as type witness for SAM type generics
  • [GROOVY-6655] - GroovyClassLoader parallelLockMap memory leak on Java 7
  • [GROOVY-7247] - spreadMap type inference is incorrect and STC reports on valid code
  • [GROOVY-7370] - Varargs in constructor are not treated correctly when creating instances of anonymous class
  • [GROOVY-7506] - Cannot assign value of type java.util.List<java.lang.String> to variable of type java.lang.String[]
  • [GROOVY-8487] - @CompileStatic calls DefaultGroovyMethods.iterator with Iterator value in for loop
  • [GROOVY-8737] - STC Method resolution fails if other methods with more parameters exist
  • [GROOVY-8828] - Union types incorrectly resolved
  • [GROOVY-8965] - instanceof with || inserts wrong cast
  • [GROOVY-9415] - failure in static compilation with getAt
  • [GROOVY-9999] - @TypeChecked results in Error when groovy casts to BigDecimal ([Static type checking] - Cannot find matching method java.lang.Math#sqrt(java.math.BigDecimal))

Dependency upgrade

Improvement

  • [GROOVY-10696] - The DGM removeAll variants which take a closure can be refactored to use removeIf for better efficiency
  • [GROOVY-10715] - Make StreamingTemplateEngine support reusing ClassLoader
  • [GROOVY-10732] - @Immutable handling of cloneable types should have the same behavior for non-cloneables on JDK16+
  • [GROOVY-10739] - Improve error message for malformed grab coordinate
  • [GROOVY-10743] - The use method for Category classes can't take an interface with static methods due to a NPE

New Feature

  • [GROOVY-10728] - Slight enhancement to groovy-dateutil extensions