Changelog for Groovy 2.2.0

Bug

  • [GROOVY-2974] - IntRange.step overflows near Integer.MAX_VALUE or Integer.MIN_VALUE
  • [GROOVY-3302] - Some tests are CPU load dependent
  • [GROOVY-3620] - instance initialization blocks in GroovyTestCase are not compiled as part of groovy build
  • [GROOVY-3948] - Replacing method on ExpandoMetaClass doesn't work
  • [GROOVY-4065] - groovyc not compiling correctly when Grape.grab is used
  • [GROOVY-4258] - wiki-snapshot.pdf is not searchable. Text can't be copied.
  • [GROOVY-4485] - enum does not support default map constructors
  • [GROOVY-4503] - The delete key doesn't work as expected on groovysh on Linux
  • [GROOVY-4641] - Defining an abstract method in enum
  • [GROOVY-4655] - groovy.transform.EqualsAndHashCode annotation does not handle cycles
  • [GROOVY-4661] - List#getAt(Range) method doesn't work with half-exclusive ranges
  • [GROOVY-4663] - Groovy Console shows both full and sanitized stack trace by default
  • [GROOVY-4665] - incorrect behavior of array subscript operator with reverse ranges
  • [GROOVY-4701] - MissingMethodException#printStackTrace() throws exception if an arguments toString() method fails
  • [GROOVY-4794] - enum constant initializer parsing
  • [GROOVY-4838] - Class that extends ClassLoader compiled with JDK 1.5 fails to run on JDK 1.6 with IncompatibleClassChangeError
  • [GROOVY-4911] - nonintuitive behaviour on getting sublist with range
  • [GROOVY-5068] - SecureASTCustomizer receiver needs documentation
  • [GROOVY-5078] - Compiler should not allow 2 methods with same name and no argument to return different types
  • [GROOVY-5211] - Method dispatch error with @Delegate
  • [GROOVY-5243] - @Canonical @TupleConstructor can't handle Object or Map properties
  • [GROOVY-5261] - A static method call inside a static closure bypasses closure delegate behavior
  • [GROOVY-5349] - ICO file in distribution is broken/missing
  • [GROOVY-5440] - using dataset queries not supported in groovyConsole
  • [GROOVY-5474] - groovy-all-2.0.0-beta-3-indy.jar invoke dynamic jar lacks osgi attributes
  • [GROOVY-5610] - Type checking of method calls using generics and default values is not supported
  • [GROOVY-5697] - Wiki snapshot (pdf) is outdated
  • [GROOVY-5742] - CompileStatic goes into infinite loop when handling self-referential generics
  • [GROOVY-5755] - MissingPropertyException thrown when referencing an externally declared constant from a switch case in an enum instance method
  • [GROOVY-5756] - error during class generation: cannot define closures inside methods of an enum instance
  • [GROOVY-5771] - Project compilation fails when I put an enum in my project
  • [GROOVY-5801] - sql.firstRow() fetches all rows of query
  • [GROOVY-5802] - Exception thrown in groovyConsole
  • [GROOVY-5839] - Typechecker does not detect shadowed generic parameter
  • [GROOVY-5871] - @Grapes/@Grab not working with GroovyConsole
  • [GROOVY-5873] - Type checker does not infer generic type
  • [GROOVY-5882] - @CompileStatic breaks with generic boxed numerics
  • [GROOVY-5883] - @CompileStatic incorrectly inferred closure return type upper bound
  • [GROOVY-5885] - @CompileStatic incorrectly infers generic return type
  • [GROOVY-5891] - Static compiler wrongly infers the return type of Class<T>.cast()
  • [GROOVY-5898] - Sql.java throws IllegalStateException("Failed to process query. Unterminated ' character?") when comments contain quotes
  • [GROOVY-5920] - Type not inferred from Iterator<Data<String>>
  • [GROOVY-5931] - groovy.util.slurpersupport.GPathResult is not java.lang.Iterable
  • [GROOVY-5937] - groovydoc does not document type alias for property correctly
  • [GROOVY-5938] - groovydoc does not document array property correctly
  • [GROOVY-5939] - groovydoc does not show link for property type
  • [GROOVY-5940] - groovydoc does not show class hierarchy correctly
  • [GROOVY-5948] - memoizeAtLeast and memoizeBetween don't cleanup garbage-collected SoftReferences
  • [GROOVY-5958] - 'Allowed Interruption' menu item is missing at GroovyConsole on MacOSX
  • [GROOVY-5971] - jarjar issue with CliBuilder/GroovyPosixParser
  • [GROOVY-5974] - @Delegate should support including/excluding which methods are delegated to (and optionally complain if multiple exist) - simple use cases
  • [GROOVY-5980] - Finally executes twice on NPE while casting method result
  • [GROOVY-5987] - JavaDoc and GroovyDoc tasks always rebuild
  • [GROOVY-6004] - Groovydoc should process annotations more intelligently
  • [GROOVY-6007] - @GrabResolver doesn't affect Ivy
  • [GROOVY-6017] - NPE in Groovydoc
  • [GROOVY-6019] - Cross compilation of Groovy annotation on Java class does not work
  • [GROOVY-6025] - Using short, byte, char annotation definition attribute constants should be supported
  • [GROOVY-6032] - @GrabResolver information is not retained at runtime in compiled class
  • [GROOVY-6048] - Generated Java stub for inner interface with generics fails to compile
  • [GROOVY-6054] - context variable breaks output transformation
  • [GROOVY-6056] - @Lazy(soft=true) not quite right
  • [GROOVY-6057] - Add a Collection#combinations(Closure) method
  • [GROOVY-6058] - JsonSlurper should support URL and File variants for parse
  • [GROOVY-6065] - Overriding enum methods in constant specific body does not work if non-default constructor is used
  • [GROOVY-6068] - Thread safety issue in AntBuilder leads to major memory leak
  • [GROOVY-6080] - IncompatibleClassChangeError: the number of constructors during runtime and compile time
  • [GROOVY-6082] - GroovyResultSet not updateable for Prepared Statements
  • [GROOVY-6085] - Annotation for inner interface in Java stub should not use dollar notation
  • [GROOVY-6093] - @XmlEnumValue annotation is lost from enum constant during compilation
  • [GROOVY-6106] - A list of syntax highlighting errors
  • [GROOVY-6120] - Verify error in class annotated with @Category if instance field is used *
  • [GROOVY-6121] - Object[].groupBy is not defined
  • [GROOVY-6122] - FilteredNodeChildren doesn't provide childNodes() iterator
  • [GROOVY-6125] - Bugs in GPathResult.parent() and '..' notation *
  • [GROOVY-6143] - groovysh & groovysh completion vulnerable to Classes with custom getProperty()
  • [GROOVY-6152] - LazyList does not allow range access
  • [GROOVY-6155] - Can't access private static constant from closure, when using @CompileStatic
  • [GROOVY-6158] - Missing directory entries in groovy-all JAR
  • [GROOVY-6171] - Memory tweaks for groovy compiler
  • [GROOVY-6179] - Sublist can be modified by parent list operations
  • [GROOVY-6188] - java8 lambda style coercion for Closure
  • [GROOVY-6192] - @EqualsAndHashCode override not working when used with @Immutable if @Immutable appears first
  • [GROOVY-6194] - Exclusive range operation results in wrong result with negative index *
  • [GROOVY-6196] - groovy compiler throws ArrayIndexOutOfBoundsException when combining @CompileStatic with @ToString/@EqualsAndHashCode with certain property names
  • [GROOVY-6199] - @CompileStatic class throws runtime errors accessing outer class methods inside nested closures
  • [GROOVY-6201] - groovysh hangs on Edit command when using terminal editor (vim, nano, etc.) on posix terminals
  • [GROOVY-6205] - META-INF/services/org.codehaus.groovy.runtime.ExtensionModule missing from groovy-all.jar
  • [GROOVY-6211] - Fix failing Process tests on windows
  • [GROOVY-6217] - The Edit command should replace the shell buffer, not append.
  • [GROOVY-6232] - Type checker fails with internal error for diamond
  • [GROOVY-6233] - static type checker fails to check constructor arguments
  • [GROOVY-6234] - Groovy can not be build with Gradle 1.6
  • [GROOVY-6237] - wrong resolution for hidden generics
  • [GROOVY-6241] - Type inference fails for methods returning generic map types
  • [GROOVY-6250] - Parsing issue with enums using inner generic methods
  • [GROOVY-6251] - Grab of an extension module with a transitive dependency fails
  • [GROOVY-6261] - Inefficient method DefaultGrailsDomainClassInjector.implementsMethod(..)
  • [GROOVY-6262] - Sql.withTransaction setAutoCommit in finally not wrapped in try/catch
  • [GROOVY-6266] - 'class generation' bug when CompileStatic with HashMap and List
  • [GROOVY-6270] - Verifyerror in static compiled code
  • [GROOVY-6272] - Cannot define a no-args closure in Groovy Shell
  • [GROOVY-6274] - replaceNode improvements for XML processing *
  • [GROOVY-6275] - DOMCategory: text() doesn't get node value if it is a CDATA section
  • [GROOVY-6288] - Overloaded operator with return type
  • [GROOVY-6289] - Null arg call not ambiguouseven though it should be
  • [GROOVY-6295] - GroovyDoc doesn't escape angle brackets in @code and @literal tags
  • [GROOVY-6300] - JavaStubGenerator clears instance initializers
  • [GROOVY-6306] - Unable to use Grape to grab DLLs
  • [GROOVY-6307] - @TimedInterrupt et al only partially support multiple annotations within a single source file
  • [GROOVY-6311] - Using @CompileStatic on code that uses spread operator on a Set results in compilation error
  • [GROOVY-6317] - @CompileStatic on class using with(Closure) leads to compilation error.
  • [GROOVY-6323] - @CompileStatic error when property of delegated-to object is read
  • [GROOVY-6325] - Type checking complains when calling getter of delegated-to object with property syntax
  • [GROOVY-6332] - Name in delegate block is resolved to (inexisting) field rather than (existing) getter
  • [GROOVY-6333] - Changes required regarding unaryPlus and bitwiseNegate operators for numbers
  • [GROOVY-6341] - @CompileStatic + @Canonical + integer property == null pointer in hashcode
  • [GROOVY-6345] - upTo()/downTo() exception messages for illegal arguments should not leak implementation details *
  • [GROOVY-6350] - adding two empty lists fails with NPE
  • [GROOVY-6365] - Closure taking Object[] in @CompileStatic class gets actual parameters wrapped in additional Object[]
  • [GROOVY-6372] - @Immutable fails to recognize non immutable classes
  • [GROOVY-6375] - DateGroovyMethods#updated should be renamed to DateGroovyMethods#copyWith
  • [GROOVY-6379] - Wrong example in the api of class Map(dropWhile)
  • [GROOVY-6384] - Change all calls to Class.forName to direct dispatch so that differences around classloading between Groovy and Java are resolved
  • [GROOVY-6390] - Super constructor calls are made using MOP with @CompileStatic
  • [GROOVY-6401] - @CompileStatic type inference bug with overridden methods: causes GroovyCastException at runtime
  • [GROOVY-6402] - @CompileStatic causes null-safe operator to call method twice
  • [GROOVY-6403] - SpreadMap is horribly broken - isEmpty, containsKey, keySet etc. all fail
  • [GROOVY-6407] - Problem With EqualsAndHashCode And Primitive Boolean Properties
  • [GROOVY-6410] - Methods from java.lang.Object shouldn't be considered abstract
  • [GROOVY-6423] - Move dependency on JLine to Groovysh module

Improvement

  • [GROOVY-2183] - Allow the 'edit' command to work on windows
  • [GROOVY-3332] - The groovy.time.*Duration classes make use of java.sql.Date
  • [GROOVY-3695] - DGM method signature improvements
  • [GROOVY-3772] - Automatic indentation in groovy.util.IndentPrinter
  • [GROOVY-3969] - Groovy Console forgets size of input area
  • [GROOVY-4778] - The groovy wiki pdf dosn't support searching
  • [GROOVY-4877] - Groovy Console should set the context class loader to the class loader that loaded the script.
  • [GROOVY-4943] - Allow enableAutoDownload to be set when using @Grab
  • [GROOVY-5445] - Make @Delegate delegate to inherited property accessors
  • [GROOVY-5709] - improve Grapes error reporting for ZipException
  • [GROOVY-5749] - Groovy Console -- Option to Auto-Save on Run
  • [GROOVY-5973] - DGM.collectMany() overload that accepts Iterable
  • [GROOVY-6039] - Allow type checking extensions to handle ambiguous references to methods
  • [GROOVY-6043] - Precompiled typechecking extension scripts
  • [GROOVY-6044] - Add handler for "Cannot return value of type Foo on method returning type Bar" error
  • [GROOVY-6053] - Try iterating or transforming Object into Collection in DefaultGroovyMethods like count(), sort() and other Collection methods.
  • [GROOVY-6062] - Hard check for JTable in ColumnModelFactory.onNodeCompleted prevented columnModel() to be used in a noparent()-block
  • [GROOVY-6073] - Fixes and improvements for Groovysh
  • [GROOVY-6074] - Import completion for all jar files on CLASSPATH
  • [GROOVY-6076] - New DelegatingScript Class which provides a delegate for property and method calls
  • [GROOVY-6112] - Support AST transforms on the field generated by @Field in scripts
  • [GROOVY-6134] - Make @DelegatesTo support mapping to generic type argument
  • [GROOVY-6139] - Extend groovysh completion evaluating "mostly" safe expressions before cursor
  • [GROOVY-6145] - Groovysh could allow filename completion inside strings
  • [GROOVY-6150] - Add 'doc' command to groovysh
  • [GROOVY-6160] - @DelegatesTo should be @Documented
  • [GROOVY-6269] - Document limitation of normal map-style constructor use when using @Immutable
  • [GROOVY-6287] - @Immutable could support Class as an immutable type
  • [GROOVY-6305] - newWriter() method for OutputStream
  • [GROOVY-6346] - allow package keyword to appear in select places
  • [GROOVY-6348] - Grab should provide a way to expose disabling checksums
  • [GROOVY-6362] - Support for dynamic method calls in static compilation
  • [GROOVY-6364] - More efficient implementation of thread safety in class ClassLoaderForClassArtifacts
  • [GROOVY-6371] - Documentation for connection parameters in URL.getText() (and related methods) is lacking
  • [GROOVY-6382] - Bintray JCenter added as a first remote resolver in the default Ivy chain
  • [GROOVY-6394] - Groovysh: Move Command and CommandException classes into groovysh subproject *

New Feature

  • [GROOVY-4164] - A groovier way of iterate over dates/calendars: upTo() and downTo()
  • [GROOVY-4379] - Providing Groovy binary release (groovy-binary.zip) in Maven repository
  • [GROOVY-4993] - @Memoized AST Transformation for Methods
  • [GROOVY-6087] - grape command could provide a resolver option for "install"
  • [GROOVY-6178] - Add class name completion to 'doc' command
  • [GROOVY-6259] - Allow to define the logger category name for the @Log annotations *
  • [GROOVY-6338] - Add @Log4j2 Annotation
  • [GROOVY-6354] - Allow addCopyWith for @Immutable annotation
  • [GROOVY-6376] - Add @BaseScript AST transformation

Sub-task

Task

Test

  • [GROOVY-5069] - AstBuilderFromSpecificationTest.testElvisOperatorExpression(): DSL and expected AST incorrect

Wish

  • [GROOVY-5956] - Poor performans of string concatenations
  • [GROOVY-6208] - Move groovy.icns to lib
  • [GROOVY-6225] - Change template of "index-all.html" so that it can be parsed by Dash's javadocset command
  • [GROOVY-6226] - Configure Gradle Eclipse plugin for groovy-core

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