You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2021/10/12 11:42:00 UTC

[jira] [Resolved] (GROOVY-10297) Refine @ToString and @EqualsAndHashCode generation of fallback methods

     [ https://issues.apache.org/jira/browse/GROOVY-10297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul King resolved GROOVY-10297.
--------------------------------
    Fix Version/s: 4.0.0-beta-2
         Assignee: Paul King
       Resolution: Fixed

> Refine @ToString and @EqualsAndHashCode generation of fallback methods
> ----------------------------------------------------------------------
>
>                 Key: GROOVY-10297
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10297
>             Project: Groovy
>          Issue Type: Improvement
>            Reporter: Paul King
>            Assignee: Paul King
>            Priority: Major
>             Fix For: 4.0.0-beta-2
>
>
> When using @ToString and @EqualsAndHashCode, the transforms attempt to create a private underscore version of the method. This supports a somewhat crude mechanism for customisation where a hand-written method could call and tweak the underscore version, e.g. we could write our own {{toString()}} and call {{_toString()}}. This underscore method wouldn't normally be useful if the found {{toString()}} was generated by another transform. This issue is to adjust the relevant transforms to not generate the underscore variant in this scenario.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)