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 2019/06/06 23:43:00 UTC

[jira] [Commented] (GROOVY-9163) AutoExternalize AST transform replaces custom read/write method

    [ https://issues.apache.org/jira/browse/GROOVY-9163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16858183#comment-16858183 ] 

Paul King commented on GROOVY-9163:
-----------------------------------

Actually, I see that the method is not overridden but is still marked as @Generated. Fixing {{addGeneratedMethod}} should actually fix all cases and numerous others.

> AutoExternalize AST transform replaces custom read/write method
> ---------------------------------------------------------------
>
>                 Key: GROOVY-9163
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9163
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 3.0.0-beta-1, 2.5.7
>            Reporter: Andres Almiray
>            Priority: Major
>
> A class defined as
> {code:java}
> @groovy.transform.AutoExternalize
> class ClassUnderTest { 
>     void writeExternal(ObjectOutput out) throws IOException { }
>     void readExternal(ObjectInput oin) { }
> }
> {code}
> Will override the definition of {{readExternal/writeExternal}} every single time.
> In contrast with {{@Canonical}} for example where explicit {{toString()}} is not overridden.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)