aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-delombok
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2018-10-15 23:19:55 +0200
committerRoel Spilker <r.spilker@gmail.com>2018-10-15 23:19:55 +0200
commit89294fe03c4257e13971dd9db3738511dc01e433 (patch)
treeda411698bb6f0b35ba74a5c5565ac5624764a3a7 /test/transform/resource/after-delombok
parent7ee4ebb1a5cd2a002dc522604303b1291a46bddb (diff)
downloadlombok-89294fe03c4257e13971dd9db3738511dc01e433.tar.gz
lombok-89294fe03c4257e13971dd9db3738511dc01e433.tar.bz2
lombok-89294fe03c4257e13971dd9db3738511dc01e433.zip
add tests to ensure onlyExplicitlyIncluded means nothing if no fields are annotated. Fixes #1772
Diffstat (limited to 'test/transform/resource/after-delombok')
-rw-r--r--test/transform/resource/after-delombok/EqualsAndHashCodeExplicitInclude.java22
-rw-r--r--test/transform/resource/after-delombok/ToStringExplicitInclude.java8
2 files changed, 30 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/EqualsAndHashCodeExplicitInclude.java b/test/transform/resource/after-delombok/EqualsAndHashCodeExplicitInclude.java
new file mode 100644
index 00000000..7de3d5fe
--- /dev/null
+++ b/test/transform/resource/after-delombok/EqualsAndHashCodeExplicitInclude.java
@@ -0,0 +1,22 @@
+class EqualsAndHashCodeExplicitInclude {
+ int x;
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public boolean equals(final java.lang.Object o) {
+ if (o == this) return true;
+ if (!(o instanceof EqualsAndHashCodeExplicitInclude)) return false;
+ final EqualsAndHashCodeExplicitInclude other = (EqualsAndHashCodeExplicitInclude) o;
+ if (!other.canEqual((java.lang.Object) this)) return false;
+ return true;
+ }
+ @java.lang.SuppressWarnings("all")
+ protected boolean canEqual(final java.lang.Object other) {
+ return other instanceof EqualsAndHashCodeExplicitInclude;
+ }
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public int hashCode() {
+ int result = 1;
+ return result;
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-delombok/ToStringExplicitInclude.java b/test/transform/resource/after-delombok/ToStringExplicitInclude.java
new file mode 100644
index 00000000..e6b4c09a
--- /dev/null
+++ b/test/transform/resource/after-delombok/ToStringExplicitInclude.java
@@ -0,0 +1,8 @@
+class ToStringExplicitInclude {
+ int x;
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public java.lang.String toString() {
+ return "ToStringExplicitInclude()";
+ }
+} \ No newline at end of file