Changelog for Groovy 3.0.0-beta-1

Bug

  • [GROOVY-7160] - NoSuchMethodError for varargs when type parameter extends interface
  • [GROOVY-7687] - Bug with @CompileStatic and nested closures
  • [GROOVY-7812] - Static inner classes cannot be accessed from other files when running by 'groovy' command
  • [GROOVY-7856] - Adding CompileStatic via compiler config script to class with eachWithIndex results in exception in instruction selection phase
  • [GROOVY-7954] - Equal Operator for Classes implementing Comparable not Working on Interfaces
  • [GROOVY-7996] - Using with method with a closure that references a protected property produces ClassCastException
  • [GROOVY-8073] - Map delegate within @CompileStatic
  • [GROOVY-8238] - multiple-catch statement behaves strangely
  • [GROOVY-8272] - Extending trait can't execute static method
  • [GROOVY-8651] - Method override weaker access check does not fully account for package-private visibility
  • [GROOVY-8873] - Fails at runtime with @CompileStatic and two nested with
  • [GROOVY-8907] - StringGroovyMethods.findAll(String, Pattern, Closure) and StringGroovyMethods.findAll(CharSequence, Pattern, Closure) is with @ClosureParams incorrect
  • [GROOVY-8913] - Parrot Parser: partially-parenthesized binary expression parsed as cast and unary plus
  • [GROOVY-8947] - Fail to resolve non-static inner class outside of outer class
  • [GROOVY-8951] - Traits defining getter conflicts with generated getter (improvements for pre-compiled case)
  • [GROOVY-8953] - Imported enum causes compilation bug preventing tests from compiling
  • [GROOVY-8954] - VerifyError due to incorrect bytecode produced when a trait super property call also comes from an interface
  • [GROOVY-8959] - NPE in StaticVerifier
  • [GROOVY-8964] - MissingMethodException when trying to resolve overload with variable arguments
  • [GROOVY-8967] - @Immutable not handling property default values from map constructor
  • [GROOVY-8969] - Parameter name data is erased when applying traits regardless of --parameters setting
  • [GROOVY-8970] - Fix typo in MANIFEST.MF: Main-class
  • [GROOVY-8975] - GroovyCastException on the result of CliBuilder.parseFromSpec
  • [GROOVY-8978] - NPE when accessing protected method from subclass clone
  • [GROOVY-8990] - No compiler error for mismatched generics when using &
  • [GROOVY-8991] - Difference in behaviour with closure and lambda
  • [GROOVY-9007] - Getting java.lang.NoSuchFieldError with groovy version 2.5.6
  • [GROOVY-9009] - AutoClone throws ClassCastException when used with @ToString or @EqualsAndHashCode
  • [GROOVY-9010] - MissingMethodException during ASTTest annotation assert execution
  • [GROOVY-9014] - printf does not respect "out" property
  • [GROOVY-9018] - WARNING: package sun.awt.windows not in java.desktop
  • [GROOVY-9028] - @EqualsAndHashCode can't recognize final field
  • [GROOVY-9035] - config script: unexpected NPE when processing compiler config DSL
  • [GROOVY-9040] - scripts within src/bin don't pass latest shellcheck recommendations
  • [GROOVY-9043] - Access to package-scoped static field is forbidden for inner class in static compilation mode
  • [GROOVY-9046] - Build hardening
  • [GROOVY-9049] - EncodingGroovyMethods.digest() truncates hashes over 128 bits starting with 0's
  • [GROOVY-9050] - Missing @Generated annotation in @Sortable
  • [GROOVY-9051] - The default constructor should be annotated with @Generated
  • [GROOVY-9052] - Missing @Generated annotation on @Vetoable
  • [GROOVY-9053] - Missing @Generated annotation in @Bindable
  • [GROOVY-9058] - each parameter type not correctly inferenced
  • [GROOVY-9061] - Tests containing @Grab statements within nested scripts fail in JDK12
  • [GROOVY-9063] - Groovy 2.5.6 @CompileStatic generates invalid bytecode (leading to runtime ClassCastException) when accessing protected instance member from 2 level of nested closures
  • [GROOVY-9077] - STC: inferred type not always stored for property getters that resolve to a method
  • [GROOVY-9078] - Inefficiency in MethodNode and ConstructorNode
  • [GROOVY-9079] - STC: NPE in StaticTypeCheckingVisitor.inferSAMTypeGenericsInAssignment
  • [GROOVY-9080] - MarkupTemplateEngine uses invalid XML entity for escaping double quotes
  • [GROOVY-9086] - @CompileStatic of closure calls with OWNER_FIRST fail at runtime with ClassCastException
  • [GROOVY-9095] - Default retention policy not implemented for annotation
  • [GROOVY-9096] - Repeatable annotation not wrapped with container type in class file
  • [GROOVY-9105] - Fix trying to compile properties files and anything that doesn't end with java

Dependency upgrade

Documentation

  • [GROOVY-9019] - triple-single and triple-double quotes handle backslash escapes equally

Epic

Improvement

  • [GROOVY-8180] - GroovyConsole improvement: log to file option
  • [GROOVY-8339] - Fix warning "An illegal reflective access operation has occurred"
  • [GROOVY-8535] - FieldNode constructor appears to call setType incorrectly
  • [GROOVY-8704] - IntRange should be Serializable
  • [GROOVY-8719] - Add DelegatesTo annotation to CompilerCustomizationBuilder.withConfig
  • [GROOVY-8903] - Retrofit NamedParams to groovy.sql.Sql
  • [GROOVY-8942] - Highlight matched parentheses, brackets and curly braces in Groovy Console when caret touching them
  • [GROOVY-8943] - @CompileStatic with getAt(int) and getAt(String)
  • [GROOVY-8945] - Improve performance of DGM `groupBy` and `countBy`
  • [GROOVY-8949] - Run dependency management call as privileged action
  • [GROOVY-8962] - Provide an option to generate Java stubs in memory for better compilation performance
  • [GROOVY-8971] - The VMPlugin configureClassNode method should retain parameter name information when available
  • [GROOVY-8972] - CompilationUnit#createClassVisitor should use the class node resolver rather than the class loader directly
  • [GROOVY-8986] - Change the order of default imported packages to reduce the times of resolving
  • [GROOVY-8987] - Support profiling parser
  • [GROOVY-8995] - Improve the performance of creating list
  • [GROOVY-9008] - Support native method reference and constructor reference (basic cases)
  • [GROOVY-9022] - In Groovy console, enable option for output to be on the right side. (horizontal split)
  • [GROOVY-9029] - [Console] Save output log file preferences to OS preferences
  • [GROOVY-9034] - adjust Java grammar for underscore in numeric literals (fixes some Groovydoc parse errors of Java files)
  • [GROOVY-9037] - allow java grammar to partially understand "default" in interfaces (just enough to keep groovydoc processing of java files happy)
  • [GROOVY-9038] - allow antlr2 java grammar to partially understand try-with-resources (just enough to keep groovydoc processing of java files happy)
  • [GROOVY-9060] - Make the initial capacity of LinkedHashMap be power of 2 for better performance
  • [GROOVY-9065] - Add support for @Testable annotation in JUnit5Runner
  • [GROOVY-9067] - Compile Java stubs with standard API
  • [GROOVY-9073] - Support preview features in compiled classes
  • [GROOVY-9081] - CLONE - Fix warning "An illegal reflective access operation has occurred"
  • [GROOVY-9083] - groovyConsole should be updated to understand method references and lambda expressions
  • [GROOVY-9084] - Add the missing delegate methods to `InnerLoader`
  • [GROOVY-9085] - Add INOUT stored procedure example to asciidoc doc for groovy-sql
  • [GROOVY-9099] - Throw a better exception when validating native method reference fails
  • [GROOVY-9100] - CompilerConfiguration.DEFAULT should be immutable
  • [GROOVY-9101] - GroovyConsole should have a right-click context menu
  • [GROOVY-9108] - Make Interpreter changeable in Groovysh

Sub-task

  • [GROOVY-2773] - Strange behaviour when passing chained methods (methodA().methodB().etc()) as parameters
  • [GROOVY-3446] - Method call resolves to statically imported method instead of equally named local method
  • [GROOVY-4287] - CLONE - import of static nested classes in external groovy files is broken
  • [GROOVY-5852] - Static import on demand resolves capitalised reference
  • [GROOVY-5961] - Variable scope not checked properly for AIC in static method