You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Albert Fernández Marsal (JIRA)" <ji...@apache.org> on 2018/12/17 08:38:00 UTC
[jira] [Updated] (GROOVY-8929) Inconsistent equals and hashCode for
int[]
[ https://issues.apache.org/jira/browse/GROOVY-8929?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Albert Fernández Marsal updated GROOVY-8929:
--------------------------------------------
Affects Version/s: (was: 2.5.4)
2.4.14
> Inconsistent equals and hashCode for int[]
> ------------------------------------------
>
> Key: GROOVY-8929
> URL: https://issues.apache.org/jira/browse/GROOVY-8929
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 2.4.14
> Reporter: Albert Fernández Marsal
> Priority: Major
>
> {code}
> 09:29:~$ groovysh
> Groovy Shell (2.4.14, JVM: 1.8.0_171)
> Type ':help' or ':h' for help.
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> groovy:000> a = [1,2,3] as int[]
> ===> [1, 2, 3]
> groovy:000> a.class
> ===> class [I
> groovy:000> b = [1,2,3] as int[]
> ===> [1, 2, 3]
> groovy:000> b.class
> ===> class [I
> groovy:000> a == b
> ===> true
> groovy:000> a.hashCode()
> ===> 1329315688
> groovy:000> b.hashCode()
> ===> 1489933928
> groovy:000>
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)