From 83e2fb5e00e1868f0b4f0fe38b1ea1383119f8ee Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Mon, 18 Jul 2011 20:59:52 +0200 Subject: Now either all or none of equals/hashCode/canEqual is generated. Fixes issue 240. --- .../EqualsAndHashCodeWithExistingMethods.java | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 test/transform/resource/after-ecj/EqualsAndHashCodeWithExistingMethods.java (limited to 'test/transform/resource/after-ecj/EqualsAndHashCodeWithExistingMethods.java') diff --git a/test/transform/resource/after-ecj/EqualsAndHashCodeWithExistingMethods.java b/test/transform/resource/after-ecj/EqualsAndHashCodeWithExistingMethods.java new file mode 100644 index 00000000..50b219f1 --- /dev/null +++ b/test/transform/resource/after-ecj/EqualsAndHashCodeWithExistingMethods.java @@ -0,0 +1,27 @@ +@lombok.EqualsAndHashCode class EqualsAndHashCodeWithExistingMethods { + int x; + EqualsAndHashCodeWithExistingMethods() { + super(); + } + public int hashCode() { + return 42; + } +} +final @lombok.EqualsAndHashCode class EqualsAndHashCodeWithExistingMethods2 { + int x; + EqualsAndHashCodeWithExistingMethods2() { + super(); + } + public boolean equals(Object other) { + return false; + } +} +final @lombok.EqualsAndHashCode(callSuper = true) class EqualsAndHashCodeWithExistingMethods3 extends EqualsAndHashCodeWithExistingMethods { + int x; + EqualsAndHashCodeWithExistingMethods3() { + super(); + } + public boolean canEqual(Object other) { + return true; + } +} \ No newline at end of file -- cgit