From 2e5ea518cc4041f2ef79d5d9cc0f970d805b6e64 Mon Sep 17 00:00:00 2001 From: Rawi01 Date: Tue, 22 Dec 2020 16:45:05 +0100 Subject: [fixes #2443] Remove multiline Javadoc tags --- .../resource/after-delombok/BuilderJavadoc.java | 2 - .../resource/after-delombok/JavadocMultiline.java | 51 ++++++++++++++++++++++ .../resource/after-ecj/BuilderJavadoc.java | 1 - .../resource/after-ecj/JavadocMultiline.java | 40 +++++++++++++++++ .../resource/before/JavadocMultiline.java | 22 ++++++++++ 5 files changed, 113 insertions(+), 3 deletions(-) create mode 100644 test/transform/resource/after-delombok/JavadocMultiline.java create mode 100644 test/transform/resource/after-ecj/JavadocMultiline.java create mode 100644 test/transform/resource/before/JavadocMultiline.java (limited to 'test/transform') diff --git a/test/transform/resource/after-delombok/BuilderJavadoc.java b/test/transform/resource/after-delombok/BuilderJavadoc.java index c99bfe90..f7caa2d6 100644 --- a/test/transform/resource/after-delombok/BuilderJavadoc.java +++ b/test/transform/resource/after-delombok/BuilderJavadoc.java @@ -3,7 +3,6 @@ class BuilderJavadoc { /** * basic gets only a builder setter. * @see #getsetwith - * * @return tag is removed from the setter. */ private final int basic; @@ -92,7 +91,6 @@ class BuilderJavadoc { } /** * getsetwith gets a builder setter, an instance getter and setter, and a wither. - * * @return tag is moved to the getter. */ @java.lang.SuppressWarnings("all") diff --git a/test/transform/resource/after-delombok/JavadocMultiline.java b/test/transform/resource/after-delombok/JavadocMultiline.java new file mode 100644 index 00000000..cc8b1148 --- /dev/null +++ b/test/transform/resource/after-delombok/JavadocMultiline.java @@ -0,0 +1,51 @@ +class JavadocMultiline { + /** + * This is a list of booleans. + */ + private java.util.List booleans; + /** + * This is a list of booleans. + */ + private java.util.List booleans2; + + /** + * This is a list of booleans. + * + * @return A list of booleans to set for this object. This is a Javadoc return that is long + * enough to wrap to multiple lines. + */ + @java.lang.SuppressWarnings("all") + public java.util.List getBooleans() { + return this.booleans; + } + + /** + * This is a list of booleans. + */ + @java.lang.SuppressWarnings("all") + public java.util.List getBooleans2() { + return this.booleans2; + } + + /** + * This is a list of booleans. + * + * @param booleans A list of booleans to set for this object. This is a Javadoc param that is + * long enough to wrap to multiple lines. + */ + @java.lang.SuppressWarnings("all") + public void setBooleans(final java.util.List booleans) { + this.booleans = booleans; + } + + /** + * This is a list of booleans. + * + * @param booleans A list of booleans to set for this object. This is a Javadoc param that is + * long enough to wrap to multiple lines. + */ + @java.lang.SuppressWarnings("all") + public void setBooleans2(final java.util.List booleans2) { + this.booleans2 = booleans2; + } +} \ No newline at end of file diff --git a/test/transform/resource/after-ecj/BuilderJavadoc.java b/test/transform/resource/after-ecj/BuilderJavadoc.java index 3afd3be2..f5790ee7 100644 --- a/test/transform/resource/after-ecj/BuilderJavadoc.java +++ b/test/transform/resource/after-ecj/BuilderJavadoc.java @@ -58,7 +58,6 @@ import java.util.List; } /** * getsetwith gets a builder setter, an instance getter and setter, and a wither. - * * @return tag is moved to the getter. */ public @java.lang.SuppressWarnings("all") int getGetsetwith() { diff --git a/test/transform/resource/after-ecj/JavadocMultiline.java b/test/transform/resource/after-ecj/JavadocMultiline.java new file mode 100644 index 00000000..bf058975 --- /dev/null +++ b/test/transform/resource/after-ecj/JavadocMultiline.java @@ -0,0 +1,40 @@ +@lombok.Getter @lombok.Setter class JavadocMultiline { + private java.util.List booleans; + private java.util.List booleans2; + JavadocMultiline() { + super(); + } + /** + * This is a list of booleans. + * + * @return A list of booleans to set for this object. This is a Javadoc return that is long + * enough to wrap to multiple lines. + */ + public @java.lang.SuppressWarnings("all") java.util.List getBooleans() { + return this.booleans; + } + /** + * This is a list of booleans. + */ + public @java.lang.SuppressWarnings("all") java.util.List getBooleans2() { + return this.booleans2; + } + /** + * This is a list of booleans. + * + * @param booleans A list of booleans to set for this object. This is a Javadoc param that is + * long enough to wrap to multiple lines. + */ + public @java.lang.SuppressWarnings("all") void setBooleans(final java.util.List booleans) { + this.booleans = booleans; + } + /** + * This is a list of booleans. + * + * @param booleans A list of booleans to set for this object. This is a Javadoc param that is + * long enough to wrap to multiple lines. + */ + public @java.lang.SuppressWarnings("all") void setBooleans2(final java.util.List booleans2) { + this.booleans2 = booleans2; + } +} diff --git a/test/transform/resource/before/JavadocMultiline.java b/test/transform/resource/before/JavadocMultiline.java new file mode 100644 index 00000000..8557dba8 --- /dev/null +++ b/test/transform/resource/before/JavadocMultiline.java @@ -0,0 +1,22 @@ +@lombok.Getter +@lombok.Setter +class JavadocMultiline { + /** + * This is a list of booleans. + * + * @param booleans A list of booleans to set for this object. This is a Javadoc param that is + * long enough to wrap to multiple lines. + * @return A list of booleans to set for this object. This is a Javadoc return that is long + * enough to wrap to multiple lines. + */ + private java.util.List booleans; + + + /** + * This is a list of booleans. + * + * @param booleans A list of booleans to set for this object. This is a Javadoc param that is + * long enough to wrap to multiple lines. + */ + private java.util.List booleans2; +} -- cgit