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

ASF GitHub Bot commented on GROOVY-8203:
----------------------------------------

GitHub user paulk-asert opened a pull request:

    https://github.com/apache/groovy/pull/550

    GROOVY-8203: Add @Newify will cause ?. operator NPE

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/paulk-asert/groovy groovy8203

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/groovy/pull/550.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #550
    
----
commit 8b4316c8f5ee70cbac2c71d465ecaf3048182676
Author: paulk <[email protected]>
Date:   2017-05-25T07:26:54Z

    GROOVY-8203: Add @Newify will cause ?. operator NPE

----


> Add @Newify will cause ?. operator NPE
> --------------------------------------
>
>                 Key: GROOVY-8203
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8203
>             Project: Groovy
>          Issue Type: Bug
>          Components: xforms
>    Affects Versions: 2.4.11
>         Environment: Win 8.1, Oracle JDK 8u121, Groovy 2.4.11
>            Reporter: Huabin Zhang
>            Priority: Critical
>              Labels: features
>
> Hi, guys:
>     When I add {{@Newify}} annotation to a class and then use {{?.}} 
> operator, I'll get a NPE, please see the sample code as below:
> {code:java|title=Z.groovy|borderStyle=solid}
> @Newify(A)
> class Z {
>     static void main(String... args) {
>         def a
>         a?.get('b')
>     }
>     class A {
>     }
> }
> {code}



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

Reply via email to