# HG changeset patch # User Stefan Anzinger # Date 1425996506 -3600 # Node ID edf663acfb3f0331d11d6bdca1cebff6e5713337 # Parent 84144a672012e4c585c469f4eeae2eda62b0d813 Do not rely on object identity when comparing Value.ILLEGAL diff -r 84144a672012 -r edf663acfb3f graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/Value.java --- 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(); } };