The Groovy compiler gives a compile error for a static initialiser, unless the { appears on the same line as static...
In other words,
static {
// do something
}
compiles, but
static
{
// do something else
}
gives a compile error.
For example, the attached file gives a compile error:
$ groovy Test.groovy
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, Test.groovy: 3: unexpected token: static @ line 3, column 3.
static
^
1 error