Skip to content

Instantly share code, notes, and snippets.

@davidecavestro
Created December 9, 2013 09:37
Show Gist options
  • Save davidecavestro/7869714 to your computer and use it in GitHub Desktop.
Save davidecavestro/7869714 to your computer and use it in GitHub Desktop.
class Foo extends AbstractMap<Object, Object>{
String bar
def map = [:]
String getBar () {bar}
//map impl
public Set entrySet() {map.entrySet()}
}
Foo foo = new Foo (bar: 'baz')
assert foo.getBar() == 'baz' //WORKS
assert foo.bar == 'baz' //FAILS because foo.bar is NULL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment