aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2019-01-08 03:33:24 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2019-01-08 03:33:52 +0100
commitccfab5ebffbd14df59689b23ff6f3df52890dca8 (patch)
tree3022d684cae61f0fdb2d59856d72b677f0721a02 /test
parent20df86149d3fe45a82d9b83e33b801f5dc7c34ca (diff)
downloadlombok-ccfab5ebffbd14df59689b23ff6f3df52890dca8.tar.gz
lombok-ccfab5ebffbd14df59689b23ff6f3df52890dca8.tar.bz2
lombok-ccfab5ebffbd14df59689b23ff6f3df52890dca8.zip
[#1033] steps on the way to issue 1033: You can add cleanup tasks which are deferred (during the javac run) until the end.
This already fixes the exotic-to-the-point-of-nonexistent bug where setter and wither compete to steal the `@param` off of the field’s javadoc. Next are to fix builder and setter/wither competing whilst bringing javadocs to `@Builder`. Then for various other conflicts, we should defer removal of lombok imports and annotations until the end too.
Diffstat (limited to 'test')
-rw-r--r--test/transform/resource/after-delombok/SetterWitherJavadocParamCopy.java28
-rw-r--r--test/transform/resource/after-ecj/SetterWitherJavadocParamCopy.java13
-rw-r--r--test/transform/resource/before/SetterWitherJavadocParamCopy.java16
3 files changed, 57 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/SetterWitherJavadocParamCopy.java b/test/transform/resource/after-delombok/SetterWitherJavadocParamCopy.java
new file mode 100644
index 00000000..e6f5ab75
--- /dev/null
+++ b/test/transform/resource/after-delombok/SetterWitherJavadocParamCopy.java
@@ -0,0 +1,28 @@
+class SetterWitherJavadocParamCopy {
+ /**
+ * Some text
+ */
+ private int fieldName;
+
+ public SetterWitherJavadocParamCopy(int f) {
+ this.fieldName = f;
+ }
+ /**
+ * Some text
+ *
+ * @param fieldName Hello, World1
+ */
+ @java.lang.SuppressWarnings("all")
+ public void setFieldName(final int fieldName) {
+ this.fieldName = fieldName;
+ }
+ /**
+ * Some text
+ *
+ * @param fieldName Hello, World1
+ */
+ @java.lang.SuppressWarnings("all")
+ public SetterWitherJavadocParamCopy withFieldName(final int fieldName) {
+ return this.fieldName == fieldName ? this : new SetterWitherJavadocParamCopy(fieldName);
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/SetterWitherJavadocParamCopy.java b/test/transform/resource/after-ecj/SetterWitherJavadocParamCopy.java
new file mode 100644
index 00000000..741342f7
--- /dev/null
+++ b/test/transform/resource/after-ecj/SetterWitherJavadocParamCopy.java
@@ -0,0 +1,13 @@
+class SetterWitherJavadocParamCopy {
+ private @lombok.Setter @lombok.experimental.Wither int fieldName;
+ public SetterWitherJavadocParamCopy(int f) {
+ super();
+ this.fieldName = f;
+ }
+ public @java.lang.SuppressWarnings("all") void setFieldName(final int fieldName) {
+ this.fieldName = fieldName;
+ }
+ public @java.lang.SuppressWarnings("all") SetterWitherJavadocParamCopy withFieldName(final int fieldName) {
+ return ((this.fieldName == fieldName) ? this : new SetterWitherJavadocParamCopy(fieldName));
+ }
+}
diff --git a/test/transform/resource/before/SetterWitherJavadocParamCopy.java b/test/transform/resource/before/SetterWitherJavadocParamCopy.java
new file mode 100644
index 00000000..4de091e2
--- /dev/null
+++ b/test/transform/resource/before/SetterWitherJavadocParamCopy.java
@@ -0,0 +1,16 @@
+class SetterWitherJavadocParamCopy {
+ /**
+ * Some text
+ *
+ * @param fieldName Hello, World1
+ * --- GETTER ---
+ * Getter section
+ *
+ * @return Sky is blue1
+ */
+ @lombok.Setter @lombok.experimental.Wither private int fieldName;
+
+ public SetterWitherJavadocParamCopy(int f) {
+ this.fieldName = f;
+ }
+}