Here is a checklist of changes you'll need to make to a Groovy classic codebase to ensure compatibility with the new Groovy JSR syntax
- return is mandatory in all non-void methods
- return/break/continue to behave inside closures like these statements work in other blocks (such as the block on a for() or while() loop. More details here
- local variable declarations and fields currently need to be specified with 'def' or a type. e.g.
property
This page lists all the main differences made to Classic Groovy to the New Groovy (the JSR based Groovy language)
def foo()
Unknown macro: { x = 1 +5 // dumb expression! return 8}{code}
- markup / builders will change a little. Not sure of the syntax, but we'll have some kinda start/stop syntax to denote a markup block. Maybe a keyword, like
Labels