You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by noamt <gi...@git.apache.org> on 2017/05/31 19:01:54 UTC

[GitHub] groovy pull request #555: GROOVY-8200 - Shorthand |= results in NPE

GitHub user noamt opened a pull request:

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

    GROOVY-8200 - Shorthand |= results in NPE

    Fixing the NPE with an explicit test and assignment of the right-hand boolean operator.
    Assigning a primitive boolean variable with null, like `boolean x = null`, will end up as `false`.
    I think it only makes sense to apply the same behavior to the right hand operator.

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

    $ git pull https://github.com/noamt/groovy GroovyGROOVY-8200

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

    https://github.com/apache/groovy/pull/555.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 #555
    
----
commit 11a0b159d8d04f3c1e518613566a1b459ecda44d
Author: noamt <no...@10ne.org>
Date:   2017-05-31T18:57:04Z

    GROOVY-8200 - Shorthand |= results in NPE:
    Fixing the NPE with an explicit test and assignment of the right-hand boolean operator.
    Assigning a primitive boolean variable with null, like `boolean x = null`, will end up as `false`.
    I think it only makes sense to apply the same behavior to the right hand operator.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] groovy pull request #555: GROOVY-8200 - Shorthand |= results in NPE

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---