Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The configuration code is easier to read and maintain, thanks to the clarity brought by thebuilder approach. But we’ve only seen a couple examples of customization, and you should have a look at the other customizations available in theorg.codehaus.groovy.control.customizers.builder package to learn more about them.

Other Minor Enhancements

...

Additonal DGM methods

There are now leftShift and withFormatter methods for Appendable objects.
There are now methods for creating temporary directories and determining the total size of all files in a directory.
There is now a collectMany for maps (has been backported to earlier versions of Groovy too).
There is now a closeStreams() method for Process objects.

GroovyDoc

You

...

ca now explicitly set a file encoding.

Command-line

There is support for using a "jar:" prefix when running a script from a URL, in addition to the "file:" and "http:".

XML Processing

There is a method for escaping / encoding XML entities in Strings.
There is a convenience method for serializing

...

Elements objects. 
You

...

ca now clone Node and NodeList objects. 
The name() method now works for all Node objects, not just Element objects. 

ConfigSlurper

Multiple environments blocks are now supported and merged.

@Delegate

Can now carry over annotations if desired for methods and method parameters.

@ToString

You can now cache the toString value. This is useful for immutable objects.

@EqualsAndHashCode

You can now cache the calculated hashCode value. This is useful for immutable objects.

Command line

There is support for using a “jar:” prefix when running a script from a URL, in addition to "file:" and "http:".

@Immutable

You can now specify knownImmutables. When you know you are using an immutable object, but its type

...

isn't one of the known immutable types.

ConfigSlurper

Mulitple environments blocks are now supported and merged.

@AutoClone

There is now a SIMPLE AutoCloneStyle which avoids some annoyances with

...

Java's cloning behavior from Object. Those who need to clone Grails domain objects might find this useful.