Dear users, and developers,
The Groovy development team and the JSR-241 Expert Group are pleased to announce the release of Groovy beta 10. There has been again a lot of work done on two main fronts: fixing a fair amount of bugs, and releasing an Early Access Preview of the new parser developed as part of the JSR effort.
On the Classic Groovy front, among other things:
- some bad typing problems are fixed,
- a few error messages are improved for more readability and a safer user experience,
- better exception handling is achieved,
- and the binary scripts now have proper executable permissions set.
This release also includes an Early Access version of the JSR parser. This is disabled by default; so that "Classic Groovy" is used out of the box. To enable the JSR parser you can configure the JSR parser property on the CompilerConfiguration object; or use the groovy.jsr system property:
or:
The next release, which should be out next month, will enable the JSR parser by default and will be tagged with "jsr" as a new naming scheme, to break from the line of betas. So please consider this release a migration release to the new JSR parser.
To check that the new parser is enabled, try this snippet in the shell:
which will print "x = 123" in JSR groovy and "x = $x" in classic.
In case you want to embed Groovy with the JSR parser, you'll need the groovy-jsr-xxx.jar and antlr-xxx.jar on your classpath. In future releases we'll integrate this all together in the groovy-all-xxx.jar
If you fancy it, please help us test this first cut at the new Groovy grammar, and make it a better Groovy
I hope you will enjoy this preview.
Here are the release notes for this new beta (mostly related to Groovy Classic):
Bugs
- GROOVY-76 Broken GroovyMock test case
- GROOVY-255 Throwing Exceptions in Builders confuses groovy
- GROOVY-305 single character strings should be coerced to characters if it helps
- GROOVY-310 Subclasses cannot access inhierited static fields from implicit class context
- GROOVY-325 Static closures have wrong owner object
- GROOVY-342 try/catch not catching
- GROOVY-368 character sequences (String.next()) don't work as expected
- GROOVY-382 Cast to int[] fails at runtime
- GROOVY-473 creating primitive type arrays don't actually create primitive type arrays
- GROOVY-525 after upack, files in bin aren't executable
- GROOVY-532 += gives me "Unable to pop operand off"
- GROOVY-540 Cannot catch imported exception
- GROOVY-559 Can't find constractor with an array parameter
- GROOVY-564 Verify error with polymorphic functions
- GROOVY-566 throwing exception within each() closure gets changed to InvokerInvocationException
- GROOVY-593 XMLBuilder makes broken XML if data contains &
- GROOVY-598 array of object in class
- GROOVY-669 groovyc creates class files that does not verify java.lang.VerifyError
- GROOVY-675 multiple backslashes and backslash plus dollarsign are not correctly interpreted
- GROOVY-696 Groovy misses first exception
- GROOVY-649 Seriously Large Memory Leak (reproducable)
- GROOVY-703 Check null pointer condition in method convertToByteArray
- GROOVY-704 Primitive function arguments cause VerifyError
- GROOVY-708 Misleading error message
- GROOVY-709 println error reporting not correct
- GROOVY-713 Method Overload with Primitive Array Parameters
- GROOVY-714 Which method should be called in this case (primitive array vs its wrapper array)?
- GROOVY-717 method call for method with same name as a field causes wierdness
- GROOVY-721 respect null values when unboxing arrays
- GROOVY-722 don't use boxing for arrays created when calling methods
- GROOVY-724 class cast exception when using empty boolean arrays
- GROOVY-726 no line number in exception stack trace
- GROOVY-727 Parsing Error for the Multiplication Operator in New Groovy
- GROOVY-733 NullpointerException instead of MissingMethodException
- GROOVY-738 Parsing Error for Bitwise Operations in NewGroovy
- GROOVY-739 Handling the Meta Character \b in String or GString
- GROOVY-743 Accessing private field gives MissingPropertyException, not
New Features
- GROOVY-692 minv/maxv where closure computes value
- GROOVY-702 GroovySQL should allow a closure to be registered to configure the JDBC statement before use
- GROOVY-744 Allow groovy script extensions to be left off when running from command line
Improvements
- GROOVY-375 classloader enhancements to MetaClass
- GROOVY-542 bitwise "or", "and" and "xor"
- GROOVY-678 swing 2d example code cleaning
- GROOVY-680 the tarball does not include +x permissions on the bin/ scripts
- GROOVY-701 log error/throw exception in Builder
- GROOVY-710 Removed a needless IOException from GroovyShell
- GROOVY-718 improve error reporting for throwables
- GROOVY-730 Add the "oneRow" method to the groovy.sql.Sql class
- GROOVY-745 more readabel error message when script name is equal to an variable name
- GROOVY-746 use equals to compare strings