aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/transform/resource/after-delombok/GetterLazyTransient.java26
-rw-r--r--test/transform/resource/after-ecj/GetterLazyTransient.java28
-rw-r--r--test/transform/resource/before/GetterLazyTransient.java10
-rw-r--r--test/transform/resource/messages-delombok/GetterLazyTransient.java.messages1
-rw-r--r--test/transform/resource/messages-ecj/GetterLazyTransient.java.messages1
5 files changed, 66 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/GetterLazyTransient.java b/test/transform/resource/after-delombok/GetterLazyTransient.java
new file mode 100644
index 00000000..dbebad90
--- /dev/null
+++ b/test/transform/resource/after-delombok/GetterLazyTransient.java
@@ -0,0 +1,26 @@
+class GetterLazyTransient {
+ private final java.util.concurrent.atomic.AtomicReference<java.lang.Object> nonTransientField = new java.util.concurrent.atomic.AtomicReference<java.lang.Object>();
+ private final transient int transientField = 2;
+ private final transient int nonLazyTransientField = 3;
+ @java.lang.SuppressWarnings("all")
+ @javax.annotation.Generated("lombok")
+ public 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;
+ }
+ @java.lang.SuppressWarnings("all")
+ @javax.annotation.Generated("lombok")
+ public int getNonLazyTransientField() {
+ return this.nonLazyTransientField;
+ }
+}
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/before/GetterLazyTransient.java b/test/transform/resource/before/GetterLazyTransient.java
new file mode 100644
index 00000000..1a913669
--- /dev/null
+++ b/test/transform/resource/before/GetterLazyTransient.java
@@ -0,0 +1,10 @@
+class GetterLazyTransient {
+ @lombok.Getter(lazy=true)
+ private final int nonTransientField = 1;
+
+ @lombok.Getter(lazy=true)
+ private final transient int transientField = 2;
+
+ @lombok.Getter
+ private final transient int nonLazyTransientField = 3;
+}
diff --git a/test/transform/resource/messages-delombok/GetterLazyTransient.java.messages b/test/transform/resource/messages-delombok/GetterLazyTransient.java.messages
new file mode 100644
index 00000000..8c1873eb
--- /dev/null
+++ b/test/transform/resource/messages-delombok/GetterLazyTransient.java.messages
@@ -0,0 +1 @@
+5 'lazy' is not supported on transient fields. \ No newline at end of file
diff --git a/test/transform/resource/messages-ecj/GetterLazyTransient.java.messages b/test/transform/resource/messages-ecj/GetterLazyTransient.java.messages
new file mode 100644
index 00000000..8c1873eb
--- /dev/null
+++ b/test/transform/resource/messages-ecj/GetterLazyTransient.java.messages
@@ -0,0 +1 @@
+5 'lazy' is not supported on transient fields. \ No newline at end of file