In an app I'm writing, I have a field declaired "byte[] data" in a class called MediaContent. Now just for grins and chuckles i inadvertently set this field to be public. After fixing a lot of other things, I then started getting weird error messages about failed attempts to access the static method MediaContent.getData(). This confused me a lot until I discovered that if a field X is public, then grails will assume that getX is a static method.
This is counterintuitive and it just cost me half an hour *fume* ;)
No comments:
Post a Comment