From f241ef8c309b90faacabe66431b9deaebfd7087a Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Mon, 18 Jun 2018 23:46:42 +0200 Subject: Transient fields should by default be excluded from equals and hashCode. Fixes #1724 --- .../resource/before/EqualsAndHashCodeAutoExclude.java | 14 ++++++++++++++ test/transform/resource/before/ToStringAutoExclude.java | 13 +++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 test/transform/resource/before/EqualsAndHashCodeAutoExclude.java create mode 100644 test/transform/resource/before/ToStringAutoExclude.java (limited to 'test/transform/resource/before') diff --git a/test/transform/resource/before/EqualsAndHashCodeAutoExclude.java b/test/transform/resource/before/EqualsAndHashCodeAutoExclude.java new file mode 100644 index 00000000..ef672833 --- /dev/null +++ b/test/transform/resource/before/EqualsAndHashCodeAutoExclude.java @@ -0,0 +1,14 @@ +@lombok.EqualsAndHashCode +class EqualsAndHashCodeAutoExclude { + int x; + String $a; + transient String b; +} +@lombok.EqualsAndHashCode +class EqualsAndHashCodeAutoExclude2 { + int x; + @lombok.EqualsAndHashCode.Include + String $a; + @lombok.EqualsAndHashCode.Include + transient String b; +} diff --git a/test/transform/resource/before/ToStringAutoExclude.java b/test/transform/resource/before/ToStringAutoExclude.java new file mode 100644 index 00000000..49695390 --- /dev/null +++ b/test/transform/resource/before/ToStringAutoExclude.java @@ -0,0 +1,13 @@ +@lombok.ToString +class ToStringAutoExclude { + int x; + String $a; + transient String b; +} +@lombok.ToString +class ToStringAutoExclude2 { + int x; + @lombok.ToString.Include + String $a; + transient String b; +} -- cgit