# HG changeset patch # User Tom Rodriguez # Date 1437416361 25200 # Node ID f68516869b751097d0534df53115f4f553d1c07b # Parent 2241ccc653a0ff905aeb4ed40ef5dadcab13ad2f ObjectStamp.type == null is java.lang.Object diff -r 2241ccc653a0 -r f68516869b75 graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/AbstractObjectStamp.java --- a/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/AbstractObjectStamp.java Mon Jul 20 11:19:06 2015 -0700 +++ b/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/AbstractObjectStamp.java Mon Jul 20 11:19:21 2015 -0700 @@ -265,7 +265,7 @@ int result = 1; result = prime * result + super.hashCode(); result = prime * result + (exactType ? 1231 : 1237); - result = prime * result + ((type == null) ? 0 : type.hashCode()); + result = prime * result + ((type == null || type.isJavaLangObject()) ? 0 : type.hashCode()); return result; } @@ -278,7 +278,19 @@ return false; } AbstractObjectStamp other = (AbstractObjectStamp) obj; - if (exactType != other.exactType || !Objects.equals(type, other.type)) { + if (exactType != other.exactType) { + return false; + } + // null == java.lang.Object + if (type == null) { + if (other.type != null && !other.type.isJavaLangObject()) { + return false; + } + } else if (other.type == null) { + if (type != null && !type.isJavaLangObject()) { + return false; + } + } else if (!type.equals(other.type)) { return false; } return super.equals(other);