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/GetterLazyEahcToString.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/transform/resource/after-ecj/GetterLazyEahcToString.java') diff --git a/test/transform/resource/after-ecj/GetterLazyEahcToString.java b/test/transform/resource/after-ecj/GetterLazyEahcToString.java index 1ca848af..db2d4fcf 100644 --- a/test/transform/resource/after-ecj/GetterLazyEahcToString.java +++ b/test/transform/resource/after-ecj/GetterLazyEahcToString.java @@ -1,11 +1,11 @@ @lombok.EqualsAndHashCode(doNotUseGetters = true) @lombok.ToString(doNotUseGetters = true) class GetterLazyEahcToString { - private final @lombok.Getter(lazy = true) java.util.concurrent.atomic.AtomicReference> value = new java.util.concurrent.atomic.AtomicReference>(); + private final @lombok.Getter(lazy = true) java.util.concurrent.atomic.AtomicReference value = new java.util.concurrent.atomic.AtomicReference(); private final @lombok.Getter String value2 = ""; GetterLazyEahcToString() { super(); } public @java.lang.SuppressWarnings("all") String getValue() { - java.util.concurrent.atomic.AtomicReference value = this.value.get(); + java.lang.Object value = this.value.get(); if ((value == null)) { synchronized (this.value) @@ -14,12 +14,12 @@ if ((value == null)) { final String actualValue = ""; - value = new java.util.concurrent.atomic.AtomicReference(actualValue); + value = ((actualValue == null) ? this.value : actualValue); this.value.set(value); } } } - return value.get(); + return (String) ((value == this.value) ? null : value); } public @java.lang.SuppressWarnings("all") String getValue2() { return this.value2; -- cgit