Skip to content

Commit f758350

Browse files
committed
murmur on symbols now that strings still use hashCode
1 parent 50c9095 commit f758350

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/jvm/clojure/lang/Symbol.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ private Symbol(String ns_interned, String name_interned){
6969
this.name = name_interned;
7070
this.ns = ns_interned;
7171
this.hash = Util.hashCombine(name.hashCode(), Util.hash(ns));
72-
this.hasheq = Util.hashCombine(Util.hasheq(name),Util.hasheq(ns));
72+
this.hasheq = Util.hashCombine(Murmur3.hashUnencodedChars(name), ns==null?0:Murmur3.hashUnencodedChars(ns));
7373
this._meta = null;
7474
}
7575

@@ -102,7 +102,7 @@ private Symbol(IPersistentMap meta, String ns, String name){
102102
this.ns = ns;
103103
this._meta = meta;
104104
this.hash = Util.hashCombine(name.hashCode(), Util.hash(ns));
105-
this.hasheq = Util.hashCombine(Util.hasheq(name),Util.hasheq(ns));
105+
this.hasheq = Util.hashCombine(Murmur3.hashUnencodedChars(name), ns==null?0:Murmur3.hashUnencodedChars(ns));
106106
}
107107

108108
public int compareTo(Object o){

0 commit comments

Comments
 (0)