[
https://issues.apache.org/jira/browse/GROOVY-6245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15409221#comment-15409221
]
ASF GitHub Bot commented on GROOVY-6245:
----------------------------------------
GitHub user paulk-asert opened a pull request:
https://github.com/apache/groovy/pull/379
GROOVY-6245: @EqualsAndHashCode assumes get style getters for boolean…
… properties
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/paulk-asert/groovy groovy6245
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/groovy/pull/379.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 #379
----
commit 50ba3758e3fb435e6d7135455ef62251a0af22e6
Author: paulk <[email protected]>
Date: 2016-08-05T09:22:31Z
GROOVY-6245: @EqualsAndHashCode assumes get style getters for boolean
properties
----
> @EqualsAndHashCode assumes get style getters for boolean properties
> -------------------------------------------------------------------
>
> Key: GROOVY-6245
> URL: https://issues.apache.org/jira/browse/GROOVY-6245
> Project: Groovy
> Issue Type: Bug
> Components: xforms
> Affects Versions: 2.1.6, 2.2.0-beta-1, 2.4.5
> Reporter: Marcin Erdmann
>
> It basically means that equals() and hashCode() generated using
> @EqualsAsHashCode will throw MissingMethodException if you define only is
> style getters for a glass. I expected the following to pass but it doesn't:
> {code}
> import groovy.transform.EqualsAndHashCode
> @EqualsAndHashCode
> class A {
> boolean a
>
> boolean isA() { a }
> }
>
> def a1 = new A(a: true)
> def a2 = new A(a: true)
> assert a1.a
> assert a1.hashCode()
> assert a1 == a2
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)