aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-delombok/GetterLazyNative.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2012-02-14 16:39:48 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2012-02-14 16:39:48 +0100
commit06581537f24fe31ee096960be496bc503059a95e (patch)
tree3732f6fe2117c390f9812b5961dd2d95d4293026 /test/transform/resource/after-delombok/GetterLazyNative.java
parent5e9e16a6b98da5a17f5efe785917bc1e92265fc8 (diff)
downloadlombok-06581537f24fe31ee096960be496bc503059a95e.tar.gz
lombok-06581537f24fe31ee096960be496bc503059a95e.tar.bz2
lombok-06581537f24fe31ee096960be496bc503059a95e.zip
More test files, test files updated to be valid java, and ecj test now goes through the complete compile process. This means val and @Delegate testing is now enabled.
TODO: Update -eclipse tests.
Diffstat (limited to 'test/transform/resource/after-delombok/GetterLazyNative.java')
-rw-r--r--test/transform/resource/after-delombok/GetterLazyNative.java27
1 files changed, 18 insertions, 9 deletions
diff --git a/test/transform/resource/after-delombok/GetterLazyNative.java b/test/transform/resource/after-delombok/GetterLazyNative.java
index 650d0496..29e7d66d 100644
--- a/test/transform/resource/after-delombok/GetterLazyNative.java
+++ b/test/transform/resource/after-delombok/GetterLazyNative.java
@@ -15,7 +15,8 @@ class GetterLazyNative {
synchronized (this.booleanField) {
value = this.booleanField.get();
if (value == null) {
- value = new java.util.concurrent.atomic.AtomicReference<java.lang.Boolean>(true);
+ final boolean actualValue = true;
+ value = new java.util.concurrent.atomic.AtomicReference<java.lang.Boolean>(actualValue);
this.booleanField.set(value);
}
}
@@ -29,7 +30,8 @@ class GetterLazyNative {
synchronized (this.byteField) {
value = this.byteField.get();
if (value == null) {
- value = new java.util.concurrent.atomic.AtomicReference<java.lang.Byte>(1);
+ final byte actualValue = 1;
+ value = new java.util.concurrent.atomic.AtomicReference<java.lang.Byte>(actualValue);
this.byteField.set(value);
}
}
@@ -43,7 +45,8 @@ class GetterLazyNative {
synchronized (this.shortField) {
value = this.shortField.get();
if (value == null) {
- value = new java.util.concurrent.atomic.AtomicReference<java.lang.Short>(1);
+ final short actualValue = 1;
+ value = new java.util.concurrent.atomic.AtomicReference<java.lang.Short>(actualValue);
this.shortField.set(value);
}
}
@@ -57,7 +60,8 @@ class GetterLazyNative {
synchronized (this.intField) {
value = this.intField.get();
if (value == null) {
- value = new java.util.concurrent.atomic.AtomicReference<java.lang.Integer>(1);
+ final int actualValue = 1;
+ value = new java.util.concurrent.atomic.AtomicReference<java.lang.Integer>(actualValue);
this.intField.set(value);
}
}
@@ -71,7 +75,8 @@ class GetterLazyNative {
synchronized (this.longField) {
value = this.longField.get();
if (value == null) {
- value = new java.util.concurrent.atomic.AtomicReference<java.lang.Long>(1);
+ final long actualValue = 1;
+ value = new java.util.concurrent.atomic.AtomicReference<java.lang.Long>(actualValue);
this.longField.set(value);
}
}
@@ -85,7 +90,8 @@ class GetterLazyNative {
synchronized (this.floatField) {
value = this.floatField.get();
if (value == null) {
- value = new java.util.concurrent.atomic.AtomicReference<java.lang.Float>(1.0F);
+ final float actualValue = 1.0F;
+ value = new java.util.concurrent.atomic.AtomicReference<java.lang.Float>(actualValue);
this.floatField.set(value);
}
}
@@ -99,7 +105,8 @@ class GetterLazyNative {
synchronized (this.doubleField) {
value = this.doubleField.get();
if (value == null) {
- value = new java.util.concurrent.atomic.AtomicReference<java.lang.Double>(1.0);
+ final double actualValue = 1.0;
+ value = new java.util.concurrent.atomic.AtomicReference<java.lang.Double>(actualValue);
this.doubleField.set(value);
}
}
@@ -113,7 +120,8 @@ class GetterLazyNative {
synchronized (this.charField) {
value = this.charField.get();
if (value == null) {
- value = new java.util.concurrent.atomic.AtomicReference<java.lang.Character>('1');
+ final char actualValue = '1';
+ value = new java.util.concurrent.atomic.AtomicReference<java.lang.Character>(actualValue);
this.charField.set(value);
}
}
@@ -127,7 +135,8 @@ class GetterLazyNative {
synchronized (this.intArrayField) {
value = this.intArrayField.get();
if (value == null) {
- value = new java.util.concurrent.atomic.AtomicReference<int[]>(new int[]{1});
+ final int[] actualValue = new int[]{1};
+ value = new java.util.concurrent.atomic.AtomicReference<int[]>(actualValue);
this.intArrayField.set(value);
}
}