diff options
Diffstat (limited to 'test/transform/resource/after-ecj')
3 files changed, 36 insertions, 2 deletions
diff --git a/test/transform/resource/after-ecj/FieldDefaults.java b/test/transform/resource/after-ecj/FieldDefaults.java index e76c1251..a6941b7b 100644 --- a/test/transform/resource/after-ecj/FieldDefaults.java +++ b/test/transform/resource/after-ecj/FieldDefaults.java @@ -1,14 +1,20 @@ @lombok.experimental.FieldDefaults(makeFinal = true) class FieldDefaults1 { + static int STATIC = 3; final int x; @lombok.experimental.NonFinal int y; + <clinit>() { + } FieldDefaults1(int x) { super(); this.x = x; } } @lombok.experimental.FieldDefaults(level = lombok.AccessLevel.PRIVATE) class FieldDefaults2 { + static int STATIC = 3; @lombok.experimental.PackagePrivate int x; private int y; + <clinit>() { + } FieldDefaults2() { super(); } diff --git a/test/transform/resource/after-ecj/GetterLazyTransient.java b/test/transform/resource/after-ecj/GetterLazyTransient.java new file mode 100644 index 00000000..9bc0d9ae --- /dev/null +++ b/test/transform/resource/after-ecj/GetterLazyTransient.java @@ -0,0 +1,28 @@ +class GetterLazyTransient { + private final @lombok.Getter(lazy = true) java.util.concurrent.atomic.AtomicReference<java.lang.Object> nonTransientField = new java.util.concurrent.atomic.AtomicReference<java.lang.Object>(); + private final transient @lombok.Getter(lazy = true) int transientField = 2; + private final transient @lombok.Getter int nonLazyTransientField = 3; + GetterLazyTransient() { + super(); + } + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getNonTransientField() { + java.lang.Object value = this.nonTransientField.get(); + if ((value == null)) + { + synchronized (this.nonTransientField) + { + value = this.nonTransientField.get(); + if ((value == null)) + { + final int actualValue = 1; + value = actualValue; + this.nonTransientField.set(value); + } + } + } + return (java.lang.Integer) value; + } + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getNonLazyTransientField() { + return this.nonLazyTransientField; + } +}
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/ValueStaticField.java b/test/transform/resource/after-ecj/ValueStaticField.java index 4ce84a02..75e337ce 100644 --- a/test/transform/resource/after-ecj/ValueStaticField.java +++ b/test/transform/resource/after-ecj/ValueStaticField.java @@ -1,7 +1,7 @@ import lombok.Value; final @Value class ValueStaticField { - private static int x; - private static final String PASSWORD = "Ken sent me"; + static int x; + static String PASSWORD = "Ken sent me"; <clinit>() { } public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { |