groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jochen Theodorou (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GROOVY-8535) FieldNode constructor appears to call setType incorrectly
Date Sat, 07 Apr 2018 12:04:00 GMT

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

Jochen Theodorou commented on GROOVY-8535:
------------------------------------------

I think that is no patch suggestion, that is the code that is there.And it looks indeed weird

> FieldNode constructor appears to call setType incorrectly
> ---------------------------------------------------------
>
>                 Key: GROOVY-8535
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8535
>             Project: Groovy
>          Issue Type: Improvement
>    Affects Versions: 2.4.15
>            Reporter: Eric Milles
>            Priority: Major
>
> If initial value expression is non-null, the first call to {{setType}} appears to have
no effect.
> {code:java}
>     public FieldNode(String name, int modifiers, ClassNode type, ClassNode owner, Expression
initialValueExpression) {
>         this.name = name;
>         this.modifiers = modifiers;
>         this.type = type;
>         if (this.type == ClassHelper.DYNAMIC_TYPE && initialValueExpression !=
null)
>             this.setType(initialValueExpression.getType());
>         this.setType(type);
> {code}



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

Mime
View raw message