Changelog for Groovy 2.5.0-alpha-1

Bug

  • [GROOVY-2972] - groovy.lang.ObjectRange.size() disobeys its contract for large ranges of Long values.
  • [GROOVY-3233] - The main(args) entry point cannot be found when a class file has multiple classes and the first class extends another class.
  • [GROOVY-3395] - calling binding variable as function fails to try object's call() method
  • [GROOVY-4255] - BUG! exception in phase 'class generation' ... SpreadExpression should not be visited here
  • [GROOVY-4356] - Static members should not be able to access class-level generic types
  • [GROOVY-4787] - BUG! exception in phase 'class generation' generating class from map in closure
  • [GROOVY-4811] - exception while compiling annotation type
  • [GROOVY-5318] - generic types in fully-qualified class names parsing error
  • [GROOVY-5471] - Add "indy" option to Groovy Console
  • [GROOVY-5936] - java.lang.OutOfMemoryError through Iterator.collectEntries and others (part 2: handle others)
  • [GROOVY-6052] - ++ or -- doesn't respect final modifier
  • [GROOVY-6212] - SpreadExpression BUG! when slicing a List
  • [GROOVY-6263] - Accessing private methods from public ones using categories and inheritance causes MissingMethodException *
  • [GROOVY-6396] - same linkedlist code different behavior between groovy and java *
  • [GROOVY-6454] - Can't delegate (with the @Delegate annotation) to a method whose name contains a dollar ($) character
  • [GROOVY-6617] - joint compiler fails to compile groovy class implemented java interface
  • [GROOVY-6619] - Groovy command-line parser breaks when parsing '-n'
  • [GROOVY-6634] - Annotated enum constants breaks enum
  • [GROOVY-6659] - generic bounds ignored by type checking
  • [GROOVY-6660] - invalid generics symbol arity does not lead to compilation error
  • [GROOVY-6991] - CliBuilder.usage() fails with SIOBE if header/footer longer than 74 chars
  • [GROOVY-7013] - GroovyDoc cannot parse several .java files from java 1.7 source code
  • [GROOVY-7014] - A Java compile time error results in a runtime exception in Groovy
  • [GROOVY-7087] - @TupleConstructor and @Builder should be able to use defined setters rather than the field directly
  • [GROOVY-7151] - groovyc should accept meta annotation with ElementType.TYPE
  • [GROOVY-7259] - groovydoc only considers package level fields as properties even if you have a get and set methods declared
  • [GROOVY-7283] - DefaultGroovyMethods methods should include type information
  • [GROOVY-7325] - Verify error cloning a HashSet under CompileStatic conditions
  • [GROOVY-7385] - Invalid Integer & Long literals compile when they shouldn't
  • [GROOVY-7394] - @ToString could support non-field properties *
  • [GROOVY-7417] - @EqualsAndHashCode inconsistent when using boolean properties for classes with explicit getters
  • [GROOVY-7433] - API inconsistency between takeWhile, dropWhile and collectReplacements for CharSequences *
  • [GROOVY-7434] - Groovy should support resolving ambiguous signatures when using ClosureParams
  • [GROOVY-7440] - Improve ClosureParam type hints for various splitEachLine GroovyMethod methods
  • [GROOVY-7443] - instantiating a class withTraits does not use the classloader of the trait
  • [GROOVY-7465] - ResourceGroovyMethods/NioGroovyMethods BOM behavior is inconsistent
  • [GROOVY-7522] - TupleConstructor overwrites declared constructors
  • [GROOVY-7523] - TupleConstructor with empty includes includes all
  • [GROOVY-7529] - Fix up transforms (apart from TupleConstructor) which are affected by empty includes default
  • [GROOVY-7562] - imports and custom class defs not working in Groovysh Interpreter Mode
  • [GROOVY-7566] - Groovysh command arguments parser does not handle escaped blanks
  • [GROOVY-7567] - Groovysh File completion with hyphens broken
  • [GROOVY-7585] - ObjectRange strange semantics for mismatched arguments
  • [GROOVY-7608] - Comparison of decimal subclasses of Number with == fails
  • [GROOVY-7636] - NumberMath.getMath suboptimal choice for custom Numbers
  • [GROOVY-7637] - DefaultTypeTransformation.compareTo not symmetrical
  • [GROOVY-7655] - Wrong method is chosen when using super with generics
  • [GROOVY-7673] - Remove synchronized methods of groovy.sql.Sql and document it as not thread-safe *
  • [GROOVY-7750] - @Lazy allows instantiation of abstract class
  • [GROOVY-7803] - Java annotation with @Target(TYPE) on an annotation
  • [GROOVY-7827] - Allow groovyc ant task to select all available target bytecode versions
  • [GROOVY-7828] - Created a class loader that override loadClass can calls protected methods results in VerifyError
  • [GROOVY-7837] - TupleConstructor should provide pre and post annotation attributes like MapConstructor
  • [GROOVY-7852] - Inconsistent checking of final for multi-assignments
  • [GROOVY-7853] - o.c.g.r.t.DefaultTypeTransformation does not apply the right toString on primitve arrays when transforming to String *
  • [GROOVY-7862] - Statically compiled calls to protected methods of an outerclass' superclass result in IllegalAccessErrors
  • [GROOVY-7865] - Better error message in the presence of Generics arity errors
  • [GROOVY-7892] - CLONE - ClassCastException when calling DefaultTypeTransformation#compareEqual
  • [GROOVY-7902] - collate() infinite loop with zeroed step
  • [GROOVY-7920] - Simple getAt example produces a BUG exception
  • [GROOVY-7931] - javadoc generation fails for non-indy build
  • [GROOVY-7937] - CLONE - same linkedlist code different behavior between groovy and java (fix priority of DGM methods vs actual methods on an object) *
  • [GROOVY-7960] - IntRange iterator returns null instead of NoSuchElementException *
  • [GROOVY-7961] - ObjectRange iterator returns null instead of NoSuchElementException *
  • [GROOVY-7967] - AstNodeToScriptAdapter should output source using the recommended modifier order *
  • [GROOVY-7970] - Can't call private method from outer class when using anonymous inner classes and @CS
  • [GROOVY-8013] - The checking of property names during AST transform attribute processing doesn't take into account includeSuperProperties
  • [GROOVY-8016] - @TupleConstructor could use the order of properties listed in 'includes' when that option is used *
  • [GROOVY-8033] - STC: spread property references fails in static method
  • [GROOVY-8043] - NPE compiling Memoized method
  • [GROOVY-8046] - ClassFormatError void field
  • [GROOVY-8072] - AstBrowser source view does not generate labels for statements
  • [GROOVY-8086] - Bump gradle version to 3.3 on master
  • [GROOVY-8087] - bump log4j2 version
  • [GROOVY-8120] - Bump commons cli version to 1.4

Dependency upgrade

Improvement

  • [GROOVY-3976] - Alternative to "with" called "tap" that has an implicate "return delegate"
  • [GROOVY-4024] - Don't use classloader for analyzing compiled classes in groovyc
  • [GROOVY-5380] - Add Ctrl+B for word/line/block selection
  • [GROOVY-5426] - ObjectRange.iterator() is reliant on size()
  • [GROOVY-6027] - groovy -h could be more clear
  • [GROOVY-6319] - Canonical annotation should become a meta annotation
  • [GROOVY-6514] - groovysh should offer easier access to grapes
  • [GROOVY-6537] - Support getParsedOptionValue() in OptionAccessor.getProperty()
  • [GROOVY-6538] - Support default value for OptionAccessor.getProperty()
  • [GROOVY-6854] - JsonOutput should be configurable with ISO 8601 UTC time zone instead of GMT
  • [GROOVY-6928] - Support all the Java 6 classes at createSimilarCollection() and createSimilarMap()
  • [GROOVY-6975] - Provide an option to deactivate escaping in JSON serialization
  • [GROOVY-7162] - Handle @Immutable in class hierarchy?
  • [GROOVY-7227] - AST transformations relating to properties/fields should validate their includes/excludes lists
  • [GROOVY-7239] - Allow optimized array access in static compiled code with indy
  • [GROOVY-7360] - @EqualsAndHashCode generated hashcode values can be made more collision proof
  • [GROOVY-7383] - Make CompilerConfiguration.ALLOWED_JDKS public
  • [GROOVY-7422] - @AnnotationCollector could provide more control over how annotations are added in the presence of existing explicit annotations
  • [GROOVY-7426] - Add "Clear Output" Toolbar button to Groovy Console
  • [GROOVY-7427] - TupleConstructor should allow a mechanism to switch off automatic parameter defaults
  • [GROOVY-7486] - groovy.util.Node.depthFirst should provide a way to specify pre-order, post-order ordering
  • [GROOVY-7552] - add org.codehaus.groovy.runtime.DefaultGroovyMethods.isEmpty(Iterable)
  • [GROOVY-7563] - InvokerHelper formatting methods have inconsistent API *
  • [GROOVY-7565] - Groovysh tab completion should provide trailing spaces only when expecting more arguments
  • [GROOVY-7574] - Range members should be final
  • [GROOVY-7600] - @Immutable support for Optional?
  • [GROOVY-7616] - collectEntries throws cryptic error when used with split(delimiter, limit)
  • [GROOVY-7629] - ObjectRange methods duplicate functionality and should not rely on size()
  • [GROOVY-7640] - @Builder should have an option to include superclass properties
  • [GROOVY-7643] - Update GrapeIvy.groovy: set ivyInstance to IvyContext, for speed up
  • [GROOVY-7672] - TupleConstructor should have only SOURCE retention policy
  • [GROOVY-7769] - Allow @Delegate Annotation on a getter
  • [GROOVY-7825] - Enhance Groovy's CliBuilder to support annotation style definitions
  • [GROOVY-7877] - The Range abstraction could support numeric ranges where the items in the range differ by some step size different to 1
  • [GROOVY-7893] - LexerFrame could be made more general purpose and made accessible from GroovyConsole
  • [GROOVY-7905] - ListWithDefault DGM methods aren't type inference friendly
  • [GROOVY-7911] - Chained multiple assignment parsing fail
  • [GROOVY-7941] - MissingMethodException should limit argument types in getMessage()
  • [GROOVY-8011] - @ToString if used with includes='prop1,prop2' could allow the pseudo prop name 'super' as an alternative to using the includeSuper flag
  • [GROOVY-8014] - @ToString could output properties in a predefined order when 'includes' is used *
  • [GROOVY-8088] - For @MapConstructor and @TupleConstructor we should provide a default undefined value for better Java compatibility

New Feature

  • [GROOVY-4847] - Missing GDK rounding methods for BigDecimal
  • [GROOVY-7089] - Base64 URL Safe encoder
  • [GROOVY-7313] - "relativePath" extension method
  • [GROOVY-7353] - Groovy should provide a MapConstructor AST transform
  • [GROOVY-7423] - Access to Method parameter names at runtime
  • [GROOVY-7479] - Groovy should provide "inits" and "tails" DGM methods for lists
  • [GROOVY-7488] - depthFirst and breathFirst variants for XML processing taking a closure
  • [GROOVY-7540] - Add a method to StringGroovyMethods for replacing String pairs supplied as a Map
  • [GROOVY-7572] - Add withAutoClosable method
  • [GROOVY-7657] - add groovy macro module
  • [GROOVY-7745] - Add Map#removeAll(Closure) and Map#retainAll(Closure)
  • [GROOVY-7746] - Add BufferedIterator and Groovy JDK methods for it
  • [GROOVY-7755] - Add Extension Methods for JAXB Marshalling and Unmarshalling Support
  • [GROOVY-7860] - Groovy could implement an @AutoImplement transform
  • [GROOVY-8091] - Add a ASMifier tab to AstBrowser

Sub-task

  • [GROOVY-1628] - Inconsistent checking of final
  • [GROOVY-4636] - GroovyConsole AST Browser does not show object initializer statements
  • [GROOVY-5501] - When inspecting the AST, it would be nice to have the node metadata properties listed too

Task

  • [GROOVY-7429] - CLONE - upgrade Apache Commons CLI to version 1.3 - migrate OptionBuilder to Option.builder()

Wish

  • [GROOVY-6090] - Reimplement CliBuilder over another CLI API

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