From dbc67c5c2d0388692f9c9dec02b294da14fd5b56 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 18 Oct 2021 15:44:45 +0200 Subject: [#2693] Review and updates for javabeans-style capitalization lombok.config --- .../after-ecj/WithWithJavaBeansSpecCapitalization.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/transform/resource/after-ecj/WithWithJavaBeansSpecCapitalization.java (limited to 'test/transform/resource/after-ecj/WithWithJavaBeansSpecCapitalization.java') diff --git a/test/transform/resource/after-ecj/WithWithJavaBeansSpecCapitalization.java b/test/transform/resource/after-ecj/WithWithJavaBeansSpecCapitalization.java new file mode 100644 index 00000000..d530ad8a --- /dev/null +++ b/test/transform/resource/after-ecj/WithWithJavaBeansSpecCapitalization.java @@ -0,0 +1,12 @@ +@lombok.With class WithOnJavaBeansSpecCapitalization { + int aField; + WithWithJavaBeansSpecCapitalization(int aField) { + super(); + } + /** + * @return a clone of this object, except with this updated property (returns {@code this} if an identical value is passed). + */ + public @java.lang.SuppressWarnings("all") WithWithJavaBeansSpecCapitalization withaField(final int aField) { + return ((this.aField == aField) ? this : new WithWithJavaBeansSpecCapitalization(aField)); + } +} -- cgit From 890028646a93551c704f316e43348c13904193cd Mon Sep 17 00:00:00 2001 From: ysherwin Date: Tue, 19 Oct 2021 14:01:28 +0300 Subject: fixing beanspec tests --- .../ValueWithJavaBeansSpecCapitalization.java | 35 +--------------------- .../WithWithJavaBeansSpecCapitalization.java | 2 +- 2 files changed, 2 insertions(+), 35 deletions(-) (limited to 'test/transform/resource/after-ecj/WithWithJavaBeansSpecCapitalization.java') diff --git a/test/transform/resource/after-delombok/ValueWithJavaBeansSpecCapitalization.java b/test/transform/resource/after-delombok/ValueWithJavaBeansSpecCapitalization.java index b92dd5b6..543481e8 100644 --- a/test/transform/resource/after-delombok/ValueWithJavaBeansSpecCapitalization.java +++ b/test/transform/resource/after-delombok/ValueWithJavaBeansSpecCapitalization.java @@ -30,37 +30,4 @@ final class ValueWithJavaBeansSpecCapitalization { public java.lang.String toString() { return "ValueWithJavaBeansSpecCapitalization(aField=" + this.getaField() + ")"; } -} -final class ValueWithoutJavaBeansSpecCapitalization { - private final int aField; - @java.lang.SuppressWarnings("all") - public ValueWithoutJavaBeansSpecCapitalization(final int aField) { - this.aField = aField; - } - @java.lang.SuppressWarnings("all") - public int getAField() { - return this.aField; - } - @java.lang.Override - @java.lang.SuppressWarnings("all") - public boolean equals(final java.lang.Object o) { - if (o == this) return true; - if (!(o instanceof ValueWithoutJavaBeansSpecCapitalization)) return false; - final ValueWithoutJavaBeansSpecCapitalization other = (ValueWithoutJavaBeansSpecCapitalization) o; - if (this.getAField() != other.getAField()) return false; - return true; - } - @java.lang.Override - @java.lang.SuppressWarnings("all") - public int hashCode() { - final int PRIME = 59; - int result = 1; - result = result * PRIME + this.getAField(); - return result; - } - @java.lang.Override - @java.lang.SuppressWarnings("all") - public java.lang.String toString() { - return "ValueWithoutJavaBeansSpecCapitalization(aField=" + this.getAField() + ")"; - } -} +} \ No newline at end of file diff --git a/test/transform/resource/after-ecj/WithWithJavaBeansSpecCapitalization.java b/test/transform/resource/after-ecj/WithWithJavaBeansSpecCapitalization.java index d530ad8a..fb035da4 100644 --- a/test/transform/resource/after-ecj/WithWithJavaBeansSpecCapitalization.java +++ b/test/transform/resource/after-ecj/WithWithJavaBeansSpecCapitalization.java @@ -1,4 +1,4 @@ -@lombok.With class WithOnJavaBeansSpecCapitalization { +@lombok.With class WithWithJavaBeansSpecCapitalization { int aField; WithWithJavaBeansSpecCapitalization(int aField) { super(); -- cgit