Skip to content

Instantly share code, notes, and snippets.

@berdario berdario/Bar.groovy
Last active Sep 12, 2016

Embed
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 = Bar.map
static final foobar = Bar.foo
}
// 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 (Foo.bar == 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
You can’t perform that action at this time.