Mike Dillon wrote:
> begin Jim White quotation:
>
>>This violation of private permits untold havoc and means all classes,
>>not just java.lang.String, are deprived of assurance that their API
>>contracts are enforced. But such a succinct case is quite compelling.
>
> I brought this up a while ago:
>
>
http://www.nabble.com/Access-modifiers-in-Groovy-to13099409.htmlIndeed, although the case is more compelling with 'ABC' than '[ "A",
"B", "C" ] as char[]'.
I also noted this problem in an earlier (but different) topic:
http://www.nabble.com/Re%3A-Why-does-Groovy-do-object-conversion--p15587047.htmlAnd I should repeat here what I said there, please vote for this issue:
http://jira.codehaus.org/browse/GROOVY-1875I'm confused now though, because at that time I got the impression that
only private methods were exposed, and I thought I had made a test for
myself that showed fields were protected. I think though I must have
made a mistake there somewhere.
Ah, I see. I was misled by the fact that private fields do not show up
in the property list of a class and mistakenly assumed that you couldn't
set a property that isn't in the list. I'll update the issue.
As I say there, it is time to close the gaping hole and should do it for
1.6. If it is too big an incompatiblity, and some users can't deal with
it right away (this being so close to time for 1.6RC1), then we can have
a switch to enable the old behavior for them.
Jim
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email