From c86d0fcc37cee701d9781e255e5fc22dc9e2fa41 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Thu, 18 Nov 2010 14:04:32 +0100 Subject: Added link to SpoonVennersOdersky paper about equality. --- website/features/EqualsAndHashCode.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'website/features/EqualsAndHashCode.html') diff --git a/website/features/EqualsAndHashCode.html b/website/features/EqualsAndHashCode.html index dbe45218..b506837e 100644 --- a/website/features/EqualsAndHashCode.html +++ b/website/features/EqualsAndHashCode.html @@ -35,9 +35,9 @@

NEW in Lombok 0.10: Unless your class is final and extends java.lang.Object, lombok generates a canEqual method which means JPA proxies can still be equal to their base class, but subclasses that add new state don't break the equals contract. The complicated reasons for - why such a method is necessary are explained in this paper: (TODO: Find link to Venners/Spoon/Odersky). If all classes in a hierarchy are a mix of scala case classes - and classes with lombok-generated equals methods, all equality will 'just work'. If you need to write your own equals methods, you should always override canEqual - if you change equals and hashCode. + why such a method is necessary are explained in this paper: How to Write an Equality Method in Java. + If all classes in a hierarchy are a mix of scala case classes and classes with lombok-generated equals methods, all equality will 'just work'. + If you need to write your own equals methods, you should always override canEqual if you change equals and hashCode.

-- cgit