# HG changeset patch # User Thomas Wuerthinger # Date 1422442980 -3600 # Node ID a6486362285447d52dcfaa3f5be5d03ee52e6051 # Parent 0bcb0dae2c52e8e36c0bf19ac29db3440df48ed1 Shorter comparison of HotSpotResolvedFieldImpl instances. diff -r 0bcb0dae2c52 -r a64863622854 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaFieldImpl.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaFieldImpl.java Wed Jan 28 11:28:03 2015 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaFieldImpl.java Wed Jan 28 12:03:00 2015 +0100 @@ -66,7 +66,12 @@ } if (obj instanceof HotSpotResolvedJavaField) { HotSpotResolvedJavaFieldImpl that = (HotSpotResolvedJavaFieldImpl) obj; - return this.holder.equals(that.holder) && this.name.equals(that.name) && this.type.equals(that.type); + if (that.offset != this.offset) { + return false; + } else if (this.holder.equals(that.holder)) { + assert this.name.equals(that.name) && this.type.equals(that.type); + return true; + } } return false; }