aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/before
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2018-06-04 22:32:44 +0200
committerRoel Spilker <r.spilker@gmail.com>2018-06-04 22:40:24 +0200
commitfb5a5530148614e8d0c423077d9043e2d58f453b (patch)
treed008d4eb56aefc817f4c96c3fd4ab08c5a463e6f /test/transform/resource/before
parent370705e7e154309a6678b83322e243b7a32e2575 (diff)
downloadlombok-fb5a5530148614e8d0c423077d9043e2d58f453b.tar.gz
lombok-fb5a5530148614e8d0c423077d9043e2d58f453b.tar.bz2
lombok-fb5a5530148614e8d0c423077d9043e2d58f453b.zip
Do not generate a private no-args constructor if:
- The class has a parent class - There is an explicit XxxArgsConstructor annotation that would generate a no-args constructor Fixes #1703, fixes #1704, fixes #1712
Diffstat (limited to 'test/transform/resource/before')
-rw-r--r--test/transform/resource/before/PrivateNoArgsConstructor.java40
1 files changed, 40 insertions, 0 deletions
diff --git a/test/transform/resource/before/PrivateNoArgsConstructor.java b/test/transform/resource/before/PrivateNoArgsConstructor.java
new file mode 100644
index 00000000..911e430f
--- /dev/null
+++ b/test/transform/resource/before/PrivateNoArgsConstructor.java
@@ -0,0 +1,40 @@
+// CONF: lombok.equalsAndHashCode.callSuper = call
+public class PrivateNoArgsConstructor {
+ private static class Base {
+ }
+
+ @lombok.Data
+ public static class PrivateNoArgsConstructorNotOnExtends extends Base {
+ private final int a;
+ }
+
+ @lombok.Data
+ public static class PrivateNoArgsConstructorOnExtendsObject extends Object {
+ private final int b;
+ }
+
+ @lombok.NoArgsConstructor(force=true)
+ @lombok.Data
+ @lombok.RequiredArgsConstructor
+ public static class PrivateNoArgsConstructorExplicitBefore {
+ private final int c;
+ }
+
+ @lombok.Data
+ @lombok.NoArgsConstructor(force=true)
+ @lombok.RequiredArgsConstructor
+ public static class PrivateNoArgsConstructorExplicitAfter {
+ private final int d;
+ }
+
+ @lombok.Data
+ @lombok.NoArgsConstructor(access=lombok.AccessLevel.NONE)
+ @lombok.RequiredArgsConstructor
+ public static class PrivateNoArgsConstructorExplicitNone {
+ private final int e;
+ }
+
+ @lombok.Data
+ public static class PrivateNoArgsConstructorNoFields {
+ }
+}