Inconsistent hash with java collections

Description

c.c/hash always use hashCode for java collections, which is incompatible when comparing with Clojure collections, which use Murmur3.

1 2 3 4 user=> (== (hash (java.util.ArrayList. [1 2 3])) (hash [1 2 3])) false user=> (= (java.util.ArrayList. [1 2 3]) [1 2 3]) true

One way to fix it is to add a special case in Util/hasheq for java.util.Collections, as it is now for Strings.

Link to a discussion of this topic in the Clojure group: https://groups.google.com/forum/#!topic/clojure/dQhdwZsyIEw

Environment

1.6.0 master

Status

Assignee

Unassigned

Reporter

Jozef Wagner

Labels

Approval

Vetted

Patch

Code and Test

Fix versions

Affects versions

Release 1.6

Priority

Minor
Configure