groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul King (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (GROOVY-8219) Add @TupleConstructor(includeFields = true) to a class implements a trait which contains properties will cause NPE
Date Thu, 08 Jun 2017 23:08:18 GMT

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

Paul King updated GROOVY-8219:
------------------------------
    Priority: Major  (was: Critical)

> Add @TupleConstructor(includeFields = true) to a class implements a trait which contains
properties will cause NPE
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-8219
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8219
>             Project: Groovy
>          Issue Type: Bug
>          Components: xforms
>    Affects Versions: 2.4.11
>         Environment: Win 8.1, Oracle JDK 8u112
>            Reporter: Huabin Zhang
>
> Hi, guys:
> I got NPE when I wrote the following codes:
> {code:java|title=Groovy Script|borderStyle=solid}
> trait T {
>     def x = 'abc'
> }
> import groovy.transform.TupleConstructor
> @TupleConstructor(includeFields = true)
> class A implements T {
>     def a
>     private b
> }
> assert 'ABC' == new A().x.toUpperCase()
> {code}
> I found that it will works well if I remove {{(includefields = true)}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message