Skip to content

Instantly share code, notes, and snippets.



Last active Sep 12, 2016
What would you like to do?
package foo
class Bar {
static final map = foo
static final foo = [1,2,3]
package foo
class Foo {
static final bar =
static final foobar =
// Groovy won't track dependencies across files... that is, Bar has a bug and you can fix it by reordering the static final attributes
// When reloading/reimporting the code, you'll see the correct/updated values in Bar
// But even if you manually reimport Foo, you'll still see the previous value ( == null) if Foo.groovy hasn't been modified
// the only way to realize it, was to kill the application, and restart it (which on some Grails applications can take more than 2 minutes )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment