Mercurial > hg > graal-compiler
diff graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotReferenceMap.java @ 18349:7aa6180a3486
fixed NullPointerException in HotSpotReferenceMap.equals
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 12 Nov 2014 14:41:32 +0100 |
parents | d60dd21329f2 |
children | 6383574293f9 |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotReferenceMap.java Wed Nov 12 14:40:45 2014 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotReferenceMap.java Wed Nov 12 14:41:32 2014 +0100 @@ -156,12 +156,7 @@ @Override public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((frameRefMap == null) ? 0 : frameRefMap.hashCode()); - result = prime * result + ((registerRefMap == null) ? 0 : registerRefMap.hashCode()); - result = prime * result + ((target == null) ? 0 : target.hashCode()); - return result; + throw new UnsupportedOperationException(); } @Override @@ -171,7 +166,7 @@ } if (obj instanceof HotSpotReferenceMap) { HotSpotReferenceMap that = (HotSpotReferenceMap) obj; - if (this.frameRefMap.equals(that.frameRefMap) && this.registerRefMap.equals(that.registerRefMap) && this.target.equals(that.target)) { + if (this.frameRefMap.equals(that.frameRefMap) && Objects.equals(this.registerRefMap, that.registerRefMap) && this.target.equals(that.target)) { return true; } }