mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 20:17:25 +00:00
Transient fields should by default be excluded from equals and hashCode. Fixes #1724
This commit is contained in:
1 parent
2264ce492c
commit
f241ef8c30
7 files changed
+207
-3
No files matched your search
@@ -0,0 +1,22 @@
|
||||
@lombok.ToString class ToStringAutoExclude {
|
||||
int x;
|
||||
String $a;
|
||||
transient String b;
|
||||
ToStringAutoExclude() {
|
||||
super();
|
||||
}
|
||||
public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() {
|
||||
return (((("ToStringAutoExclude(x=" + this.x) + ", b=") + this.b) + ")");
|
||||
}
|
||||
}
|
||||
@lombok.ToString class ToStringAutoExclude2 {
|
||||
int x;
|
||||
@lombok.ToString.Include String $a;
|
||||
transient String b;
|
||||
ToStringAutoExclude2() {
|
||||
super();
|
||||
}
|
||||
public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() {
|
||||
return (((((("ToStringAutoExclude2(x=" + this.x) + ", $a=") + this.$a) + ", b=") + this.b) + ")");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user