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 | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 test/transform/resource/before/EqualsAndHashCodeWithExistingMethods.java (limited to 'test/transform/resource/before/EqualsAndHashCodeWithExistingMethods.java') diff --git a/test/transform/resource/before/EqualsAndHashCodeWithExistingMethods.java b/test/transform/resource/before/EqualsAndHashCodeWithExistingMethods.java new file mode 100644 index 00000000..be90d871 --- /dev/null +++ b/test/transform/resource/before/EqualsAndHashCodeWithExistingMethods.java @@ -0,0 +1,26 @@ +@lombok.EqualsAndHashCode +class EqualsAndHashCodeWithExistingMethods { + int x; + + public int hashCode() { + return 42; + } +} + +@lombok.EqualsAndHashCode +final class EqualsAndHashCodeWithExistingMethods2 { + int x; + + public boolean equals(Object other) { + return false; + } +} + +@lombok.EqualsAndHashCode(callSuper=true) +final class EqualsAndHashCodeWithExistingMethods3 extends EqualsAndHashCodeWithExistingMethods { + int x; + + public boolean canEqual(Object other) { + return true; + } +} \ No newline at end of file -- cgit