aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-delombok/GetterLazyBoolean.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2013-07-07 09:14:59 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2013-07-07 21:49:47 +0200
commitb6a23a7d94ee4f01b38a0e6d7db120fb05be0d6c (patch)
treed069c2bb8fbf828cdba0be7e689c7a032d3d5ded /test/transform/resource/after-delombok/GetterLazyBoolean.java
parentdfc682a0010ff1ba77496dd7644a6dcbe93017e5 (diff)
downloadlombok-b6a23a7d94ee4f01b38a0e6d7db120fb05be0d6c.tar.gz
lombok-b6a23a7d94ee4f01b38a0e6d7db120fb05be0d6c.tar.bz2
lombok-b6a23a7d94ee4f01b38a0e6d7db120fb05be0d6c.zip
@Getter(lazy=true) now uses a different, more efficient desugaring. Implementing in javac, ecj still has to be done.
Diffstat (limited to 'test/transform/resource/after-delombok/GetterLazyBoolean.java')
-rw-r--r--test/transform/resource/after-delombok/GetterLazyBoolean.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/transform/resource/after-delombok/GetterLazyBoolean.java b/test/transform/resource/after-delombok/GetterLazyBoolean.java
index caab2803..08d32013 100644
--- a/test/transform/resource/after-delombok/GetterLazyBoolean.java
+++ b/test/transform/resource/after-delombok/GetterLazyBoolean.java
@@ -1,6 +1,6 @@
class GetterLazyBoolean {
- private final java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<java.lang.Boolean>> booleanValue = new java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<java.lang.Boolean>>();
- private final java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<java.lang.Boolean>> otherBooleanValue = new java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<java.lang.Boolean>>();
+ private final java.util.concurrent.atomic.AtomicReference<java.lang.Object> booleanValue = new java.util.concurrent.atomic.AtomicReference<java.lang.Object>();
+ private final java.util.concurrent.atomic.AtomicReference<java.lang.Object> otherBooleanValue = new java.util.concurrent.atomic.AtomicReference<java.lang.Object>();
private static boolean calculateBoolean() {
return true;
}
@@ -33,32 +33,32 @@ class GetterLazyBoolean {
}
@java.lang.SuppressWarnings("all")
public boolean isBooleanValue() {
- java.util.concurrent.atomic.AtomicReference<java.lang.Boolean> value = this.booleanValue.get();
+ java.lang.Object value = this.booleanValue.get();
if (value == null) {
synchronized (this.booleanValue) {
value = this.booleanValue.get();
if (value == null) {
final boolean actualValue = calculateBoolean();
- value = new java.util.concurrent.atomic.AtomicReference<java.lang.Boolean>(actualValue);
+ value = actualValue;
this.booleanValue.set(value);
}
}
}
- return value.get();
+ return (java.lang.Boolean)value;
}
@java.lang.SuppressWarnings("all")
public boolean isOtherBooleanValue() {
- java.util.concurrent.atomic.AtomicReference<java.lang.Boolean> value = this.otherBooleanValue.get();
+ java.lang.Object value = this.otherBooleanValue.get();
if (value == null) {
synchronized (this.otherBooleanValue) {
value = this.otherBooleanValue.get();
if (value == null) {
final boolean actualValue = !calculateBoolean();
- value = new java.util.concurrent.atomic.AtomicReference<java.lang.Boolean>(actualValue);
+ value = actualValue;
this.otherBooleanValue.set(value);
}
}
}
- return value.get();
+ return (java.lang.Boolean)value;
}
}