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 <n...@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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---