Mark Wielaard writes: > On Sun, 2007-04-08 at 12:53 +0200, Christian Thalinger wrote: > > Grrr, I hate this access checks. I'll try to fix that _again_. > > This seems to be pretty subtle and we found multiple runtimes (jamvm, > cacao, gcj and kaffe at least) that seem to get this wrong. And the > online documentation is not very precise. As it says just: ... > So when Method.invoke() is called on an method member of an object which > class type isn't public then it should only be allowed to successfully > call the method if the caller is in the same package. You know, it would have been so much easier and clearer if they'd written this part of the specification in Java rather than English. Something like if (method.access == DEFAULT && method.package == caller.package) ... All these yards of verbiage would be gone, and it would actually have been unambiguous. Sigh... Andrew. -- Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, UK Registered in England and Wales No. 3798903