From e95680a76733c22ee5937a586ee50c703d5ba621 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 20 Jan 2020 15:25:08 +0100 Subject: [issue #2221] [issue #788] Lombok now adds nullity annotations. Which 'flavour' is defined in lombok.config; applied to toString, equals, canEqual, and plural-form of `@Singular`. --- .../transform/resource/after-ecj/NullLibrary2.java | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 test/transform/resource/after-ecj/NullLibrary2.java (limited to 'test/transform/resource/after-ecj/NullLibrary2.java') diff --git a/test/transform/resource/after-ecj/NullLibrary2.java b/test/transform/resource/after-ecj/NullLibrary2.java new file mode 100644 index 00000000..60ad103f --- /dev/null +++ b/test/transform/resource/after-ecj/NullLibrary2.java @@ -0,0 +1,37 @@ +public @lombok.EqualsAndHashCode @lombok.ToString @lombok.AllArgsConstructor class NullLibrary2 { + @lombok.With String foo; + public @org.springframework.lang.NonNull @java.lang.SuppressWarnings("all") NullLibrary2 withFoo(final String foo) { + return ((this.foo == foo) ? this : new NullLibrary2(foo)); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final @org.springframework.lang.Nullable java.lang.Object o) { + if ((o == this)) + return true; + if ((! (o instanceof NullLibrary2))) + return false; + final NullLibrary2 other = (NullLibrary2) o; + if ((! other.canEqual((java.lang.Object) this))) + return false; + final java.lang.Object this$foo = this.foo; + final java.lang.Object other$foo = other.foo; + if (((this$foo == null) ? (other$foo != null) : (! this$foo.equals(other$foo)))) + return false; + return true; + } + protected @java.lang.SuppressWarnings("all") boolean canEqual(final @org.springframework.lang.Nullable java.lang.Object other) { + return (other instanceof NullLibrary2); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { + final int PRIME = 59; + int result = 1; + final java.lang.Object $foo = this.foo; + result = ((result * PRIME) + (($foo == null) ? 43 : $foo.hashCode())); + return result; + } + public @java.lang.Override @org.springframework.lang.NonNull @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (("NullLibrary2(foo=" + this.foo) + ")"); + } + public @java.lang.SuppressWarnings("all") NullLibrary2(final String foo) { + super(); + this.foo = foo; + } +} -- cgit