On Thu, Oct 16, 2008 at 5:00 PM, Peter Jones <[EMAIL PROTECTED]> wrote:
> That explains it. (And the Java 6 API change was a red herring, > although I'm glad to have learned about it anyway.) Your test Policy > implementation's getPermissions method must return a new permission > collection on every invocation, per the spec contract previously > discussed, so that each caller's mutations are isolated. As it is > above, one caller will add permissions to the collection and use it to > create a protection domain, which will cause it to be set read-only, > and then a later caller will try to add permissions to the collection, > but receiving the same collection as the previous caller, will find it > to have been set read-only, causing the the exception you reported. Thanks, and I have now more reasons to be upset with "POJO"/JavaBeans naming conventions indoctrinating us. "get" at first glance sounds like a side-effect free operation. Well, well... assumptions are mother of all fuck-ups. Cheers Niclas