Mercurial > hg > truffle
changeset 19745:edf663acfb3f
Do not rely on object identity when comparing Value.ILLEGAL
author | Stefan Anzinger <stefan.anzinger@oracle.com> |
---|---|
date | Tue, 10 Mar 2015 15:08:26 +0100 |
parents | 84144a672012 |
children | c217db06182a |
files | graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/Value.java |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/Value.java Tue Mar 10 13:44:35 2015 +0100 +++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/Value.java Tue Mar 10 15:08:26 2015 +0100 @@ -37,7 +37,9 @@ @Override public boolean equals(Object other) { - return this == other; + // Due to de-serialization this object may exist multiple times. So we compare classes + // instead of the individual objects. (This anonymous class has always the same meaning) + return other != null && this.getClass() == other.getClass(); } };