From 85fec0dffa5df13c0cafc86ca762774ba2c4d951 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Sun, 7 Jul 2013 21:41:47 +0200 Subject: eclipse support for the new @Getter(lazy=true) desugaring. --- test/transform/resource/after-ecj/GetterLazyBoolean.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'test/transform/resource/after-ecj/GetterLazyBoolean.java') diff --git a/test/transform/resource/after-ecj/GetterLazyBoolean.java b/test/transform/resource/after-ecj/GetterLazyBoolean.java index 8c890827..a51b164f 100644 --- a/test/transform/resource/after-ecj/GetterLazyBoolean.java +++ b/test/transform/resource/after-ecj/GetterLazyBoolean.java @@ -1,6 +1,6 @@ @lombok.EqualsAndHashCode(of = "booleanValue") @lombok.ToString(of = "booleanValue") class GetterLazyBoolean { - private final @lombok.Getter(lazy = true) java.util.concurrent.atomic.AtomicReference> booleanValue = new java.util.concurrent.atomic.AtomicReference>(); - private final @lombok.Getter(lazy = true) java.util.concurrent.atomic.AtomicReference> otherBooleanValue = new java.util.concurrent.atomic.AtomicReference>(); + private final @lombok.Getter(lazy = true) java.util.concurrent.atomic.AtomicReference booleanValue = new java.util.concurrent.atomic.AtomicReference(); + private final @lombok.Getter(lazy = true) java.util.concurrent.atomic.AtomicReference otherBooleanValue = new java.util.concurrent.atomic.AtomicReference(); GetterLazyBoolean() { super(); } @@ -8,7 +8,7 @@ return true; } public @java.lang.SuppressWarnings("all") boolean isBooleanValue() { - java.util.concurrent.atomic.AtomicReference value = this.booleanValue.get(); + java.lang.Object value = this.booleanValue.get(); if ((value == null)) { synchronized (this.booleanValue) @@ -17,15 +17,15 @@ if ((value == null)) { final boolean actualValue = calculateBoolean(); - value = new java.util.concurrent.atomic.AtomicReference(actualValue); + value = actualValue; this.booleanValue.set(value); } } } - return value.get(); + return (java.lang.Boolean) value; } public @java.lang.SuppressWarnings("all") boolean isOtherBooleanValue() { - java.util.concurrent.atomic.AtomicReference value = this.otherBooleanValue.get(); + java.lang.Object value = this.otherBooleanValue.get(); if ((value == null)) { synchronized (this.otherBooleanValue) @@ -34,12 +34,12 @@ if ((value == null)) { final boolean actualValue = (! calculateBoolean()); - value = new java.util.concurrent.atomic.AtomicReference(actualValue); + value = actualValue; this.otherBooleanValue.set(value); } } } - return value.get(); + return (java.lang.Boolean) value; } public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { if ((o == this)) -- cgit