From dee834a39780f61a0357c42f61592cd3c3598bd3 Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Mon, 8 Nov 2010 22:00:06 +0100 Subject: Added support for canEqual in ecj --- test/transform/resource/after-ecj/DataWithGetter.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'test/transform/resource/after-ecj/DataWithGetter.java') diff --git a/test/transform/resource/after-ecj/DataWithGetter.java b/test/transform/resource/after-ecj/DataWithGetter.java index abf1dc64..904ae0fa 100644 --- a/test/transform/resource/after-ecj/DataWithGetter.java +++ b/test/transform/resource/after-ecj/DataWithGetter.java @@ -15,11 +15,11 @@ public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { if ((o == this)) return true; - if ((o == null)) - return false; - if ((o.getClass() != this.getClass())) + if ((! (o instanceof DataWithGetter))) return false; final DataWithGetter other = (DataWithGetter) o; + if ((! other.canEqual(this))) + return false; if ((this.getX() != other.getX())) return false; if ((this.getY() != other.getY())) @@ -28,6 +28,9 @@ return false; return true; } + public @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) { + return (other instanceof DataWithGetter); + } public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { final int PRIME = 31; int result = 1; -- cgit