aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-ecj
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource/after-ecj')
-rw-r--r--test/transform/resource/after-ecj/DelegateOnGetter.java2
-rw-r--r--test/transform/resource/after-ecj/GetterLazy.java2
-rw-r--r--test/transform/resource/after-ecj/GetterLazyBoolean.java4
-rw-r--r--test/transform/resource/after-ecj/GetterLazyEahcToString.java2
-rw-r--r--test/transform/resource/after-ecj/GetterLazyGenerics.java44
-rw-r--r--test/transform/resource/after-ecj/GetterLazyNative.java18
-rw-r--r--test/transform/resource/after-ecj/GetterLazyTransient.java2
7 files changed, 59 insertions, 15 deletions
diff --git a/test/transform/resource/after-ecj/DelegateOnGetter.java b/test/transform/resource/after-ecj/DelegateOnGetter.java
index 59f6a3b8..f2b9a6cd 100644
--- a/test/transform/resource/after-ecj/DelegateOnGetter.java
+++ b/test/transform/resource/after-ecj/DelegateOnGetter.java
@@ -9,7 +9,7 @@ class DelegateOnGetter {
DelegateOnGetter() {
super();
}
- public @Delegate @java.lang.SuppressWarnings("all") Bar getBar() {
+ public @Delegate @java.lang.SuppressWarnings({"all", "unchecked"}) Bar getBar() {
java.lang.Object value = this.bar.get();
if ((value == null))
{
diff --git a/test/transform/resource/after-ecj/GetterLazy.java b/test/transform/resource/after-ecj/GetterLazy.java
index 8394f58d..b4567f04 100644
--- a/test/transform/resource/after-ecj/GetterLazy.java
+++ b/test/transform/resource/after-ecj/GetterLazy.java
@@ -8,7 +8,7 @@ class GetterLazy {
GetterLazy() {
super();
}
- public @java.lang.SuppressWarnings("all") ValueType getFieldName() {
+ public @java.lang.SuppressWarnings({"all", "unchecked"}) ValueType getFieldName() {
java.lang.Object value = this.fieldName.get();
if ((value == null))
{
diff --git a/test/transform/resource/after-ecj/GetterLazyBoolean.java b/test/transform/resource/after-ecj/GetterLazyBoolean.java
index 174389e8..ad319755 100644
--- a/test/transform/resource/after-ecj/GetterLazyBoolean.java
+++ b/test/transform/resource/after-ecj/GetterLazyBoolean.java
@@ -7,7 +7,7 @@
private static boolean calculateBoolean() {
return true;
}
- public @java.lang.SuppressWarnings("all") boolean isBooleanValue() {
+ public @java.lang.SuppressWarnings({"all", "unchecked"}) boolean isBooleanValue() {
java.lang.Object value = this.booleanValue.get();
if ((value == null))
{
@@ -24,7 +24,7 @@
}
return (java.lang.Boolean) value;
}
- public @java.lang.SuppressWarnings("all") boolean isOtherBooleanValue() {
+ public @java.lang.SuppressWarnings({"all", "unchecked"}) boolean isOtherBooleanValue() {
java.lang.Object value = this.otherBooleanValue.get();
if ((value == null))
{
diff --git a/test/transform/resource/after-ecj/GetterLazyEahcToString.java b/test/transform/resource/after-ecj/GetterLazyEahcToString.java
index e66a9c2e..5197f4e1 100644
--- a/test/transform/resource/after-ecj/GetterLazyEahcToString.java
+++ b/test/transform/resource/after-ecj/GetterLazyEahcToString.java
@@ -4,7 +4,7 @@
GetterLazyEahcToString() {
super();
}
- public @java.lang.SuppressWarnings("all") String getValue() {
+ public @java.lang.SuppressWarnings({"all", "unchecked"}) String getValue() {
java.lang.Object value = this.value.get();
if ((value == null))
{
diff --git a/test/transform/resource/after-ecj/GetterLazyGenerics.java b/test/transform/resource/after-ecj/GetterLazyGenerics.java
new file mode 100644
index 00000000..67ef5543
--- /dev/null
+++ b/test/transform/resource/after-ecj/GetterLazyGenerics.java
@@ -0,0 +1,44 @@
+class GetterLazyGenerics<E> {
+ private final @lombok.Getter(lazy = true) java.util.concurrent.atomic.AtomicReference<java.lang.Object> field = new java.util.concurrent.atomic.AtomicReference<java.lang.Object>();
+ private final @lombok.Getter(lazy = true) java.util.concurrent.atomic.AtomicReference<java.lang.Object> field2 = new java.util.concurrent.atomic.AtomicReference<java.lang.Object>();
+ GetterLazyGenerics() {
+ super();
+ }
+ public static <E>E getAny() {
+ return null;
+ }
+ public @java.lang.SuppressWarnings({"all", "unchecked"}) E getField() {
+ java.lang.Object value = this.field.get();
+ if ((value == null))
+ {
+ synchronized (this.field)
+ {
+ value = this.field.get();
+ if ((value == null))
+ {
+ final E actualValue = getAny();
+ value = ((actualValue == null) ? this.field : actualValue);
+ this.field.set(value);
+ }
+ }
+ }
+ return (E) ((value == this.field) ? null : value);
+ }
+ public @java.lang.SuppressWarnings({"all", "unchecked"}) long getField2() {
+ java.lang.Object value = this.field2.get();
+ if ((value == null))
+ {
+ synchronized (this.field2)
+ {
+ value = this.field2.get();
+ if ((value == null))
+ {
+ final long actualValue = System.currentTimeMillis();
+ value = actualValue;
+ this.field2.set(value);
+ }
+ }
+ }
+ return (java.lang.Long) value;
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/GetterLazyNative.java b/test/transform/resource/after-ecj/GetterLazyNative.java
index db70f2f4..7808068e 100644
--- a/test/transform/resource/after-ecj/GetterLazyNative.java
+++ b/test/transform/resource/after-ecj/GetterLazyNative.java
@@ -11,7 +11,7 @@ class GetterLazyNative {
GetterLazyNative() {
super();
}
- public @java.lang.SuppressWarnings("all") boolean isBooleanField() {
+ public @java.lang.SuppressWarnings({"all", "unchecked"}) boolean isBooleanField() {
java.lang.Object value = this.booleanField.get();
if ((value == null))
{
@@ -28,7 +28,7 @@ class GetterLazyNative {
}
return (java.lang.Boolean) value;
}
- public @java.lang.SuppressWarnings("all") byte getByteField() {
+ public @java.lang.SuppressWarnings({"all", "unchecked"}) byte getByteField() {
java.lang.Object value = this.byteField.get();
if ((value == null))
{
@@ -45,7 +45,7 @@ class GetterLazyNative {
}
return (java.lang.Byte) value;
}
- public @java.lang.SuppressWarnings("all") short getShortField() {
+ public @java.lang.SuppressWarnings({"all", "unchecked"}) short getShortField() {
java.lang.Object value = this.shortField.get();
if ((value == null))
{
@@ -62,7 +62,7 @@ class GetterLazyNative {
}
return (java.lang.Short) value;
}
- public @java.lang.SuppressWarnings("all") int getIntField() {
+ public @java.lang.SuppressWarnings({"all", "unchecked"}) int getIntField() {
java.lang.Object value = this.intField.get();
if ((value == null))
{
@@ -79,7 +79,7 @@ class GetterLazyNative {
}
return (java.lang.Integer) value;
}
- public @java.lang.SuppressWarnings("all") long getLongField() {
+ public @java.lang.SuppressWarnings({"all", "unchecked"}) long getLongField() {
java.lang.Object value = this.longField.get();
if ((value == null))
{
@@ -96,7 +96,7 @@ class GetterLazyNative {
}
return (java.lang.Long) value;
}
- public @java.lang.SuppressWarnings("all") float getFloatField() {
+ public @java.lang.SuppressWarnings({"all", "unchecked"}) float getFloatField() {
java.lang.Object value = this.floatField.get();
if ((value == null))
{
@@ -113,7 +113,7 @@ class GetterLazyNative {
}
return (java.lang.Float) value;
}
- public @java.lang.SuppressWarnings("all") double getDoubleField() {
+ public @java.lang.SuppressWarnings({"all", "unchecked"}) double getDoubleField() {
java.lang.Object value = this.doubleField.get();
if ((value == null))
{
@@ -130,7 +130,7 @@ class GetterLazyNative {
}
return (java.lang.Double) value;
}
- public @java.lang.SuppressWarnings("all") char getCharField() {
+ public @java.lang.SuppressWarnings({"all", "unchecked"}) char getCharField() {
java.lang.Object value = this.charField.get();
if ((value == null))
{
@@ -147,7 +147,7 @@ class GetterLazyNative {
}
return (java.lang.Character) value;
}
- public @java.lang.SuppressWarnings("all") int[] getIntArrayField() {
+ public @java.lang.SuppressWarnings({"all", "unchecked"}) int[] getIntArrayField() {
java.lang.Object value = this.intArrayField.get();
if ((value == null))
{
diff --git a/test/transform/resource/after-ecj/GetterLazyTransient.java b/test/transform/resource/after-ecj/GetterLazyTransient.java
index 3ffd9b69..7e5f4a41 100644
--- a/test/transform/resource/after-ecj/GetterLazyTransient.java
+++ b/test/transform/resource/after-ecj/GetterLazyTransient.java
@@ -5,7 +5,7 @@ class GetterLazyTransient {
GetterLazyTransient() {
super();
}
- public @java.lang.SuppressWarnings("all") int getNonTransientField() {
+ public @java.lang.SuppressWarnings({"all", "unchecked"}) int getNonTransientField() {
java.lang.Object value = this.nonTransientField.get();
if ((value == null))
{