From a74db7c10c61c7a18e8fed774cac1e0cde534009 Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Mon, 4 Jun 2018 23:36:06 +0200 Subject: Make `extraPrivate` opt-in instead of opt-out. Fixes #1708 --- .../transform/resource/after-delombok/BuilderDefaults.java | 6 ------ .../after-delombok/BuilderWithRecursiveGenerics.java | 5 ----- test/transform/resource/after-delombok/DataIgnore.java | 4 ---- .../resource/after-delombok/DataOnLocalClass.java | 11 ----------- test/transform/resource/after-delombok/DataPlain.java | 12 ------------ test/transform/resource/after-delombok/DataWithGetter.java | 4 ---- .../resource/after-delombok/DataWithGetterNone.java | 4 ---- test/transform/resource/after-delombok/InnerClass.java | 4 ---- test/transform/resource/after-delombok/ValuePlain.java | 14 -------------- test/transform/resource/after-ecj/BuilderDefaults.java | 6 ------ .../resource/after-ecj/BuilderWithRecursiveGenerics.java | 5 ----- test/transform/resource/after-ecj/DataIgnore.java | 4 ---- test/transform/resource/after-ecj/DataOnLocalClass.java | 11 ----------- test/transform/resource/after-ecj/DataPlain.java | 12 ------------ test/transform/resource/after-ecj/DataWithGetter.java | 4 ---- test/transform/resource/after-ecj/DataWithGetterNone.java | 4 ---- test/transform/resource/after-ecj/InnerClass.java | 4 ---- test/transform/resource/after-ecj/ValuePlain.java | 14 -------------- test/transform/resource/before/DataConfiguration.java | 1 + .../resource/before/PrivateNoArgsConstructor.java | 1 + 20 files changed, 2 insertions(+), 128 deletions(-) (limited to 'test') diff --git a/test/transform/resource/after-delombok/BuilderDefaults.java b/test/transform/resource/after-delombok/BuilderDefaults.java index e92197ad..b916b725 100644 --- a/test/transform/resource/after-delombok/BuilderDefaults.java +++ b/test/transform/resource/after-delombok/BuilderDefaults.java @@ -67,12 +67,6 @@ public final class BuilderDefaults { return new BuilderDefaultsBuilder(); } @java.lang.SuppressWarnings("all") - private BuilderDefaults() { - this.x = 0; - this.name = null; - this.z = 0L; - } - @java.lang.SuppressWarnings("all") public int getX() { return this.x; } diff --git a/test/transform/resource/after-delombok/BuilderWithRecursiveGenerics.java b/test/transform/resource/after-delombok/BuilderWithRecursiveGenerics.java index 91674ea9..7fb300e4 100644 --- a/test/transform/resource/after-delombok/BuilderWithRecursiveGenerics.java +++ b/test/transform/resource/after-delombok/BuilderWithRecursiveGenerics.java @@ -44,11 +44,6 @@ public class BuilderWithRecursiveGenerics { return new TestBuilder(); } @java.lang.SuppressWarnings("all") - private Test() { - this.foo = null; - this.bar = null; - } - @java.lang.SuppressWarnings("all") public Foo getFoo() { return this.foo; } diff --git a/test/transform/resource/after-delombok/DataIgnore.java b/test/transform/resource/after-delombok/DataIgnore.java index 02a0107f..309d8150 100644 --- a/test/transform/resource/after-delombok/DataIgnore.java +++ b/test/transform/resource/after-delombok/DataIgnore.java @@ -6,10 +6,6 @@ class DataIgnore { this.x = x; } @java.lang.SuppressWarnings("all") - private DataIgnore() { - this.x = 0; - } - @java.lang.SuppressWarnings("all") public int getX() { return this.x; } diff --git a/test/transform/resource/after-delombok/DataOnLocalClass.java b/test/transform/resource/after-delombok/DataOnLocalClass.java index c178f1f3..84817897 100644 --- a/test/transform/resource/after-delombok/DataOnLocalClass.java +++ b/test/transform/resource/after-delombok/DataOnLocalClass.java @@ -8,10 +8,6 @@ class DataOnLocalClass1 { this.x = x; } @java.lang.SuppressWarnings("all") - private Local() { - this.x = 0; - } - @java.lang.SuppressWarnings("all") public int getX() { return this.x; } @@ -72,9 +68,6 @@ class DataOnLocalClass2 { } this.name = name; } - @java.lang.SuppressWarnings("all") - private InnerLocal() { - } @lombok.NonNull @java.lang.SuppressWarnings("all") public String getName() { @@ -123,10 +116,6 @@ class DataOnLocalClass2 { this.x = x; } @java.lang.SuppressWarnings("all") - private Local() { - this.x = 0; - } - @java.lang.SuppressWarnings("all") public int getX() { return this.x; } diff --git a/test/transform/resource/after-delombok/DataPlain.java b/test/transform/resource/after-delombok/DataPlain.java index 7b3d8f11..d54baef1 100644 --- a/test/transform/resource/after-delombok/DataPlain.java +++ b/test/transform/resource/after-delombok/DataPlain.java @@ -6,10 +6,6 @@ class Data1 { this.x = x; } @java.lang.SuppressWarnings("all") - private Data1() { - this.x = 0; - } - @java.lang.SuppressWarnings("all") public int getX() { return this.x; } @@ -62,10 +58,6 @@ class Data2 { this.x = x; } @java.lang.SuppressWarnings("all") - private Data2() { - this.x = 0; - } - @java.lang.SuppressWarnings("all") public int getX() { return this.x; } @@ -118,10 +110,6 @@ final class Data3 { this.x = x; } @java.lang.SuppressWarnings("all") - private Data3() { - this.x = 0; - } - @java.lang.SuppressWarnings("all") public int getX() { return this.x; } diff --git a/test/transform/resource/after-delombok/DataWithGetter.java b/test/transform/resource/after-delombok/DataWithGetter.java index 6d3036f4..b4107bb3 100644 --- a/test/transform/resource/after-delombok/DataWithGetter.java +++ b/test/transform/resource/after-delombok/DataWithGetter.java @@ -7,10 +7,6 @@ class DataWithGetter { this.z = z; } @java.lang.SuppressWarnings("all") - private DataWithGetter() { - this.z = null; - } - @java.lang.SuppressWarnings("all") public void setX(final int x) { this.x = x; } diff --git a/test/transform/resource/after-delombok/DataWithGetterNone.java b/test/transform/resource/after-delombok/DataWithGetterNone.java index 692ee9a0..4467e407 100644 --- a/test/transform/resource/after-delombok/DataWithGetterNone.java +++ b/test/transform/resource/after-delombok/DataWithGetterNone.java @@ -7,10 +7,6 @@ class DataWithGetterNone { this.z = z; } @java.lang.SuppressWarnings("all") - private DataWithGetterNone() { - this.z = null; - } - @java.lang.SuppressWarnings("all") public void setX(final int x) { this.x = x; } diff --git a/test/transform/resource/after-delombok/InnerClass.java b/test/transform/resource/after-delombok/InnerClass.java index 8040d9ff..2e49b9ad 100644 --- a/test/transform/resource/after-delombok/InnerClass.java +++ b/test/transform/resource/after-delombok/InnerClass.java @@ -20,10 +20,6 @@ class C { this.a = a; } @java.lang.SuppressWarnings("all") - private D() { - this.a = null; - } - @java.lang.SuppressWarnings("all") public A getA() { return this.a; } diff --git a/test/transform/resource/after-delombok/ValuePlain.java b/test/transform/resource/after-delombok/ValuePlain.java index 0cbd8621..cf2c1142 100644 --- a/test/transform/resource/after-delombok/ValuePlain.java +++ b/test/transform/resource/after-delombok/ValuePlain.java @@ -7,11 +7,6 @@ final class Value1 { this.name = name; } @java.lang.SuppressWarnings("all") - private Value1() { - this.x = 0; - this.name = null; - } - @java.lang.SuppressWarnings("all") public int getX() { return this.x; } @@ -56,11 +51,6 @@ class Value2 { this.name = name; } @java.lang.SuppressWarnings("all") - private Value2() { - this.x = 0; - this.name = null; - } - @java.lang.SuppressWarnings("all") public int getX() { return this.x; } @@ -110,10 +100,6 @@ final class Value3 { this.y = y; } @java.lang.SuppressWarnings("all") - private Value3() { - this.y = 0; - } - @java.lang.SuppressWarnings("all") public int getX() { return this.x; } diff --git a/test/transform/resource/after-ecj/BuilderDefaults.java b/test/transform/resource/after-ecj/BuilderDefaults.java index 1b9cd0ac..1a0f1168 100644 --- a/test/transform/resource/after-ecj/BuilderDefaults.java +++ b/test/transform/resource/after-ecj/BuilderDefaults.java @@ -87,10 +87,4 @@ public final @Value @Builder class BuilderDefaults { public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((((("BuilderDefaults(x=" + this.getX()) + ", name=") + this.getName()) + ", z=") + this.getZ()) + ")"); } - private @java.lang.SuppressWarnings("all") BuilderDefaults() { - super(); - this.x = 0; - this.name = null; - this.z = 0L; - } } diff --git a/test/transform/resource/after-ecj/BuilderWithRecursiveGenerics.java b/test/transform/resource/after-ecj/BuilderWithRecursiveGenerics.java index 1db5a914..8246ca2c 100644 --- a/test/transform/resource/after-ecj/BuilderWithRecursiveGenerics.java +++ b/test/transform/resource/after-ecj/BuilderWithRecursiveGenerics.java @@ -70,11 +70,6 @@ public class BuilderWithRecursiveGenerics { public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((("BuilderWithRecursiveGenerics.Test(foo=" + this.getFoo()) + ", bar=") + this.getBar()) + ")"); } - private @java.lang.SuppressWarnings("all") Test() { - super(); - this.foo = null; - this.bar = null; - } } public BuilderWithRecursiveGenerics() { super(); diff --git a/test/transform/resource/after-ecj/DataIgnore.java b/test/transform/resource/after-ecj/DataIgnore.java index d0fd1b1b..d3ac8aa3 100644 --- a/test/transform/resource/after-ecj/DataIgnore.java +++ b/test/transform/resource/after-ecj/DataIgnore.java @@ -32,8 +32,4 @@ super(); this.x = x; } - private @java.lang.SuppressWarnings("all") DataIgnore() { - super(); - this.x = 0; - } } diff --git a/test/transform/resource/after-ecj/DataOnLocalClass.java b/test/transform/resource/after-ecj/DataOnLocalClass.java index 03f0caaf..341df49b 100644 --- a/test/transform/resource/after-ecj/DataOnLocalClass.java +++ b/test/transform/resource/after-ecj/DataOnLocalClass.java @@ -50,10 +50,6 @@ class DataOnLocalClass1 { super(); this.x = x; } - private @java.lang.SuppressWarnings("all") Local() { - super(); - this.x = 0; - } } } } @@ -107,9 +103,6 @@ class DataOnLocalClass2 { } this.name = name; } - private @java.lang.SuppressWarnings("all") InnerLocal() { - super(); - } } final int x; public @java.lang.SuppressWarnings("all") int getX() { @@ -143,10 +136,6 @@ class DataOnLocalClass2 { super(); this.x = x; } - private @java.lang.SuppressWarnings("all") Local() { - super(); - this.x = 0; - } } } DataOnLocalClass2() { diff --git a/test/transform/resource/after-ecj/DataPlain.java b/test/transform/resource/after-ecj/DataPlain.java index be46cd24..eaeef509 100644 --- a/test/transform/resource/after-ecj/DataPlain.java +++ b/test/transform/resource/after-ecj/DataPlain.java @@ -45,10 +45,6 @@ import lombok.Data; super(); this.x = x; } - private @java.lang.SuppressWarnings("all") Data1() { - super(); - this.x = 0; - } } @Data class Data2 { final int x; @@ -96,10 +92,6 @@ import lombok.Data; super(); this.x = x; } - private @java.lang.SuppressWarnings("all") Data2() { - super(); - this.x = 0; - } } final @Data class Data3 { final int x; @@ -142,10 +134,6 @@ final @Data class Data3 { super(); this.x = x; } - private @java.lang.SuppressWarnings("all") Data3() { - super(); - this.x = 0; - } } final @Data @lombok.EqualsAndHashCode(callSuper = true) class Data4 extends java.util.Timer { int x; diff --git a/test/transform/resource/after-ecj/DataWithGetter.java b/test/transform/resource/after-ecj/DataWithGetter.java index 0fec7684..fa291eca 100644 --- a/test/transform/resource/after-ecj/DataWithGetter.java +++ b/test/transform/resource/after-ecj/DataWithGetter.java @@ -45,10 +45,6 @@ super(); this.z = z; } - private @java.lang.SuppressWarnings("all") DataWithGetter() { - super(); - this.z = null; - } public @java.lang.SuppressWarnings("all") int getX() { return this.x; } diff --git a/test/transform/resource/after-ecj/DataWithGetterNone.java b/test/transform/resource/after-ecj/DataWithGetterNone.java index fb4a7c2e..4545dc46 100644 --- a/test/transform/resource/after-ecj/DataWithGetterNone.java +++ b/test/transform/resource/after-ecj/DataWithGetterNone.java @@ -45,8 +45,4 @@ super(); this.z = z; } - private @java.lang.SuppressWarnings("all") DataWithGetterNone() { - super(); - this.z = null; - } } diff --git a/test/transform/resource/after-ecj/InnerClass.java b/test/transform/resource/after-ecj/InnerClass.java index 05c6dc94..32004225 100644 --- a/test/transform/resource/after-ecj/InnerClass.java +++ b/test/transform/resource/after-ecj/InnerClass.java @@ -49,10 +49,6 @@ class C { super(); this.a = a; } - private @java.lang.SuppressWarnings("all") D() { - super(); - this.a = null; - } } C() { super(); diff --git a/test/transform/resource/after-ecj/ValuePlain.java b/test/transform/resource/after-ecj/ValuePlain.java index 0ff7369e..442a63ac 100644 --- a/test/transform/resource/after-ecj/ValuePlain.java +++ b/test/transform/resource/after-ecj/ValuePlain.java @@ -38,11 +38,6 @@ final @lombok.Value class Value1 { this.x = x; this.name = name; } - private @java.lang.SuppressWarnings("all") Value1() { - super(); - this.x = 0; - this.name = null; - } } @Value @lombok.experimental.NonFinal class Value2 { public final int x; @@ -88,11 +83,6 @@ final @lombok.Value class Value1 { this.x = x; this.name = name; } - private @java.lang.SuppressWarnings("all") Value2() { - super(); - this.x = 0; - this.name = null; - } } final @Value class Value3 { private @lombok.experimental.NonFinal int x; @@ -130,8 +120,4 @@ final @Value class Value3 { this.x = x; this.y = y; } - private @java.lang.SuppressWarnings("all") Value3() { - super(); - this.y = 0; - } } diff --git a/test/transform/resource/before/DataConfiguration.java b/test/transform/resource/before/DataConfiguration.java index 8b9657f9..9e0bd420 100644 --- a/test/transform/resource/before/DataConfiguration.java +++ b/test/transform/resource/before/DataConfiguration.java @@ -1,6 +1,7 @@ //CONF: lombok.anyConstructor.suppressConstructorProperties = true //CONF: lombok.toString.doNotUseGetters = true //CONF: lombok.equalsAndHashCode.doNotUseGetters = true +//CONF: lombok.noArgsConstructor.extraPrivate = true @lombok.Data class DataConfiguration { final int x; diff --git a/test/transform/resource/before/PrivateNoArgsConstructor.java b/test/transform/resource/before/PrivateNoArgsConstructor.java index 911e430f..38f5aed0 100644 --- a/test/transform/resource/before/PrivateNoArgsConstructor.java +++ b/test/transform/resource/before/PrivateNoArgsConstructor.java @@ -1,3 +1,4 @@ +// CONF: lombok.noArgsConstructor.extraPrivate = true // CONF: lombok.equalsAndHashCode.callSuper = call public class PrivateNoArgsConstructor { private static class Base { -- cgit