You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by GitBox <gi...@apache.org> on 2020/02/05 21:32:55 UTC
[GitHub] [groovy] eric-milles opened a new pull request #1161: GROOVY-9385:
add private field accessor for each mutated private field
eric-milles opened a new pull request #1161: GROOVY-9385: add private field accessor for each mutated private field
URL: https://github.com/apache/groovy/pull/1161
https://issues.apache.org/jira/browse/GROOVY-9385
This implements the brute-force approach: add private field accessor bridge method whenever a mutator bridge method is required. It could be made more precise by checking for ++, +=, etc. Or by visiting "field++" as "field = field ...".
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [groovy] danielsun1106 merged pull request #1161: GROOVY-9385: add
private field accessor for each mutated private field
Posted by GitBox <gi...@apache.org>.
danielsun1106 merged pull request #1161: GROOVY-9385: add private field accessor for each mutated private field
URL: https://github.com/apache/groovy/pull/1161
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [groovy] eric-milles commented on issue #1161: GROOVY-9385: add
private field accessor for each mutated private field
Posted by GitBox <gi...@apache.org>.
eric-milles commented on issue #1161: GROOVY-9385: add private field accessor for each mutated private field
URL: https://github.com/apache/groovy/pull/1161#issuecomment-585263790
This change is not for access to private fields from outside. An inner class can read and write private fields of the outer class(es) using bridge methods. In the special case of GROOVY-9385, "x++" requires both a read and a write of "x". At the moment, only the write bridge method is available. Before some recent changes, "x++" was implemented as private field bridge method for read and dynamic property set for write. Now, it will use private bridge methods for both read and write.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [groovy] danielsun1106 commented on issue #1161: GROOVY-9385: add
private field accessor for each mutated private field
Posted by GitBox <gi...@apache.org>.
danielsun1106 commented on issue #1161: GROOVY-9385: add private field accessor for each mutated private field
URL: https://github.com/apache/groovy/pull/1161#issuecomment-585272954
Merged. Thanks!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [groovy] danielsun1106 commented on issue #1161: GROOVY-9385: add
private field accessor for each mutated private field
Posted by GitBox <gi...@apache.org>.
danielsun1106 commented on issue #1161: GROOVY-9385: add private field accessor for each mutated private field
URL: https://github.com/apache/groovy/pull/1161#issuecomment-585139643
AFAIR, we have forbidden illegal accessing invisible methods in the static Groovy, so invisible fields should not be allowed to access either even if Groovy supports the illegal accessing for now.
For backaward compatibility, we can provide a switch to enable illegal accessing.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [groovy] danielsun1106 commented on issue #1161: GROOVY-9385: add
private field accessor for each mutated private field
Posted by GitBox <gi...@apache.org>.
danielsun1106 commented on issue #1161: GROOVY-9385: add private field accessor for each mutated private field
URL: https://github.com/apache/groovy/pull/1161#issuecomment-585272418
Thanks for your detailed explanation. LGTM.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services