[fixes #2917] Use $value instead of value in lazy getter

This commit is contained in:
Rawi01 authored and Roel Spilker committed 2024-03-18 18:07:03 +01:00
1 parent 23307eb8d1
commit c93400d9f4
23 files changed
+361 -361

No files matched your search

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2009-2022 The Project Lombok Authors.
* Copyright (C) 2009-2024 The Project Lombok Authors.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -323,7 +323,7 @@ public class HandleGetter extends EclipseAnnotationHandler<Getter> {
TYPE_MAP = Collections.unmodifiableMap(m);
}
private static char[] valueName = "value".toCharArray();
private static char[] valueName = "$value".toCharArray();
private static char[] actualValueName = "actualValue".toCharArray();
private static final int PARENTHESIZED = (1 << ASTNode.ParenthesizedSHIFT) & ASTNode.ParenthesizedMASK;
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2009-2022 The Project Lombok Authors.
* Copyright (C) 2009-2024 The Project Lombok Authors.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -358,7 +358,7 @@ public class HandleGetter extends JavacAnnotationHandler<Getter> {
}
if (copyOfBoxedFieldType == null) copyOfBoxedFieldType = copyType(maker, field, source);
Name valueName = fieldNode.toName("value");
Name valueName = fieldNode.toName("$value");
Name actualValueName = fieldNode.toName("actualValue");
/* java.lang.Object value = this.fieldName.get();*/ {
@@ -6,11 +6,11 @@ class DelegateOnGetter {
}
@java.lang.SuppressWarnings({"all", "unchecked"})
public Bar getBar() {
java.lang.Object value = this.bar.get();
if (value == null) {
java.lang.Object $value = this.bar.get();
if ($value == null) {
synchronized (this.bar) {
value = this.bar.get();
if (value == null) {
$value = this.bar.get();
if ($value == null) {
final Bar actualValue = new Bar() {
public void setList(java.util.ArrayList<String> list) {
}
@@ -18,12 +18,12 @@ class DelegateOnGetter {
return 42;
}
};
value = actualValue == null ? this.bar : actualValue;
this.bar.set(value);
$value = actualValue == null ? this.bar : actualValue;
this.bar.set($value);
}
}
}
return (Bar) (value == this.bar ? null : value);
return (Bar) ($value == this.bar ? null : $value);
}
@java.lang.SuppressWarnings("all")
public void setList(final java.util.ArrayList<java.lang.String> list) {
@@ -4,17 +4,17 @@ class GetterLazy {
private final java.util.concurrent.atomic.AtomicReference<java.lang.Object> fieldName = new java.util.concurrent.atomic.AtomicReference<java.lang.Object>();
@java.lang.SuppressWarnings({"all", "unchecked"})
public ValueType getFieldName() {
java.lang.Object value = this.fieldName.get();
if (value == null) {
java.lang.Object $value = this.fieldName.get();
if ($value == null) {
synchronized (this.fieldName) {
value = this.fieldName.get();
if (value == null) {
$value = this.fieldName.get();
if ($value == null) {
final ValueType actualValue = new ValueType();
value = actualValue == null ? this.fieldName : actualValue;
this.fieldName.set(value);
$value = actualValue == null ? this.fieldName : actualValue;
this.fieldName.set($value);
}
}
}
return (ValueType) (value == this.fieldName ? null : value);
return (ValueType) ($value == this.fieldName ? null : $value);
}
}
@@ -21,99 +21,99 @@ class GetterLazyArguments {
@java.lang.SuppressWarnings({"all", "unchecked"})
public String getField1() {
java.lang.Object value = this.field1.get();
if (value == null) {
java.lang.Object $value = this.field1.get();
if ($value == null) {
synchronized (this.field1) {
value = this.field1.get();
if (value == null) {
$value = this.field1.get();
if ($value == null) {
final String actualValue = stringInt(("a"), (1));
value = actualValue == null ? this.field1 : actualValue;
this.field1.set(value);
$value = actualValue == null ? this.field1 : actualValue;
this.field1.set($value);
}
}
}
return (String) (value == this.field1 ? null : value);
return (String) ($value == this.field1 ? null : $value);
}
@java.lang.SuppressWarnings({"all", "unchecked"})
public String getField2() {
java.lang.Object value = this.field2.get();
if (value == null) {
java.lang.Object $value = this.field2.get();
if ($value == null) {
synchronized (this.field2) {
value = this.field2.get();
if (value == null) {
$value = this.field2.get();
if ($value == null) {
final String actualValue = stringInt(true ? "a" : "b", true ? 1 : 0);
value = actualValue == null ? this.field2 : actualValue;
this.field2.set(value);
$value = actualValue == null ? this.field2 : actualValue;
this.field2.set($value);
}
}
}
return (String) (value == this.field2 ? null : value);
return (String) ($value == this.field2 ? null : $value);
}
@java.lang.SuppressWarnings({"all", "unchecked"})
public String getField3() {
java.lang.Object value = this.field3.get();
if (value == null) {
java.lang.Object $value = this.field3.get();
if ($value == null) {
synchronized (this.field3) {
value = this.field3.get();
if (value == null) {
$value = this.field3.get();
if ($value == null) {
final String actualValue = stringInt(("a"), true ? 1 : 0);
value = actualValue == null ? this.field3 : actualValue;
this.field3.set(value);
$value = actualValue == null ? this.field3 : actualValue;
this.field3.set($value);
}
}
}
return (String) (value == this.field3 ? null : value);
return (String) ($value == this.field3 ? null : $value);
}
@java.lang.SuppressWarnings({"all", "unchecked"})
public String getField4() {
java.lang.Object value = this.field4.get();
if (value == null) {
java.lang.Object $value = this.field4.get();
if ($value == null) {
synchronized (this.field4) {
value = this.field4.get();
if (value == null) {
$value = this.field4.get();
if ($value == null) {
final String actualValue = stringRunnable(fun(), () -> {
});
value = actualValue == null ? this.field4 : actualValue;
this.field4.set(value);
$value = actualValue == null ? this.field4 : actualValue;
this.field4.set($value);
}
}
}
return (String) (value == this.field4 ? null : value);
return (String) ($value == this.field4 ? null : $value);
}
@java.lang.SuppressWarnings({"all", "unchecked"})
public String getField5() {
java.lang.Object value = this.field5.get();
if (value == null) {
java.lang.Object $value = this.field5.get();
if ($value == null) {
synchronized (this.field5) {
value = this.field5.get();
if (value == null) {
$value = this.field5.get();
if ($value == null) {
final String actualValue = stringRunnable(("a"), () -> {
});
value = actualValue == null ? this.field5 : actualValue;
this.field5.set(value);
$value = actualValue == null ? this.field5 : actualValue;
this.field5.set($value);
}
}
}
return (String) (value == this.field5 ? null : value);
return (String) ($value == this.field5 ? null : $value);
}
@java.lang.SuppressWarnings({"all", "unchecked"})
public String getField6() {
java.lang.Object value = this.field6.get();
if (value == null) {
java.lang.Object $value = this.field6.get();
if ($value == null) {
synchronized (this.field6) {
value = this.field6.get();
if (value == null) {
$value = this.field6.get();
if ($value == null) {
final String actualValue = true ? stringInt(true ? "a" : "b", true ? 1 : 0) : "";
value = actualValue == null ? this.field6 : actualValue;
this.field6.set(value);
$value = actualValue == null ? this.field6 : actualValue;
this.field6.set($value);
}
}
}
return (String) (value == this.field6 ? null : value);
return (String) ($value == this.field6 ? null : $value);
}
}
@@ -33,32 +33,32 @@ class GetterLazyBoolean {
}
@java.lang.SuppressWarnings({"all", "unchecked"})
public boolean isBooleanValue() {
java.lang.Object value = this.booleanValue.get();
if (value == null) {
java.lang.Object $value = this.booleanValue.get();
if ($value == null) {
synchronized (this.booleanValue) {
value = this.booleanValue.get();
if (value == null) {
$value = this.booleanValue.get();
if ($value == null) {
final boolean actualValue = calculateBoolean();
value = actualValue;
this.booleanValue.set(value);
$value = actualValue;
this.booleanValue.set($value);
}
}
}
return (java.lang.Boolean) value;
return (java.lang.Boolean) $value;
}
@java.lang.SuppressWarnings({"all", "unchecked"})
public boolean isOtherBooleanValue() {
java.lang.Object value = this.otherBooleanValue.get();
if (value == null) {
java.lang.Object $value = this.otherBooleanValue.get();
if ($value == null) {
synchronized (this.otherBooleanValue) {
value = this.otherBooleanValue.get();
if (value == null) {
$value = this.otherBooleanValue.get();
if ($value == null) {
final boolean actualValue = !calculateBoolean();
value = actualValue;
this.otherBooleanValue.set(value);
$value = actualValue;
this.otherBooleanValue.set($value);
}
}
}
return (java.lang.Boolean) value;
return (java.lang.Boolean) $value;
}
}
@@ -46,18 +46,18 @@ class GetterLazyEahcToString {
@java.lang.SuppressWarnings({"all", "unchecked"})
public String getValue() {
java.lang.Object value = this.value.get();
if (value == null) {
java.lang.Object $value = this.value.get();
if ($value == null) {
synchronized (this.value) {
value = this.value.get();
if (value == null) {
$value = this.value.get();
if ($value == null) {
final String actualValue = "";
value = actualValue == null ? this.value : actualValue;
this.value.set(value);
$value = actualValue == null ? this.value : actualValue;
this.value.set($value);
}
}
}
return (String) (value == this.value ? null : value);
return (String) ($value == this.value ? null : $value);
}
@java.lang.SuppressWarnings("all")
@@ -3,17 +3,17 @@ class GetterLazyErrorPosition {
@java.lang.SuppressWarnings({"all", "unchecked"})
public String getField() {
java.lang.Object value = this.field.get();
if (value == null) {
java.lang.Object $value = this.field.get();
if ($value == null) {
synchronized (this.field) {
value = this.field.get();
if (value == null) {
$value = this.field.get();
if ($value == null) {
final String actualValue = true ? "" : new ErrorPosition();
value = actualValue == null ? this.field : actualValue;
this.field.set(value);
$value = actualValue == null ? this.field : actualValue;
this.field.set($value);
}
}
}
return (String) (value == this.field ? null : value);
return (String) ($value == this.field ? null : $value);
}
}
@@ -6,32 +6,32 @@ class GetterLazyGenerics<E> {
}
@java.lang.SuppressWarnings({"all", "unchecked"})
public E getField() {
java.lang.Object value = this.field.get();
if (value == null) {
java.lang.Object $value = this.field.get();
if ($value == null) {
synchronized (this.field) {
value = this.field.get();
if (value == null) {
$value = this.field.get();
if ($value == null) {
final E actualValue = getAny();
value = actualValue == null ? this.field : actualValue;
this.field.set(value);
$value = actualValue == null ? this.field : actualValue;
this.field.set($value);
}
}
}
return (E) (value == this.field ? null : value);
return (E) ($value == this.field ? null : $value);
}
@java.lang.SuppressWarnings({"all", "unchecked"})
public long getField2() {
java.lang.Object value = this.field2.get();
if (value == null) {
java.lang.Object $value = this.field2.get();
if ($value == null) {
synchronized (this.field2) {
value = this.field2.get();
if (value == null) {
$value = this.field2.get();
if ($value == null) {
final long actualValue = System.currentTimeMillis();
value = actualValue;
this.field2.set(value);
$value = actualValue;
this.field2.set($value);
}
}
}
return (java.lang.Long) value;
return (java.lang.Long) $value;
}
}
@@ -6,18 +6,18 @@ public class GetterLazyInAnonymousClass {
@java.lang.SuppressWarnings({"all", "unchecked"})
public String getString() {
java.lang.Object value = this.string.get();
if (value == null) {
java.lang.Object $value = this.string.get();
if ($value == null) {
synchronized (this.string) {
value = this.string.get();
if (value == null) {
$value = this.string.get();
if ($value == null) {
final String actualValue = "test";
value = actualValue == null ? this.string : actualValue;
this.string.set(value);
$value = actualValue == null ? this.string : actualValue;
this.string.set($value);
}
}
}
return (String) (value == this.string ? null : value);
return (String) ($value == this.string ? null : $value);
}
}
};
@@ -10,137 +10,137 @@ class GetterLazyNative {
private final java.util.concurrent.atomic.AtomicReference<java.lang.Object> intArrayField = new java.util.concurrent.atomic.AtomicReference<java.lang.Object>();
@java.lang.SuppressWarnings({"all", "unchecked"})
public boolean isBooleanField() {
java.lang.Object value = this.booleanField.get();
if (value == null) {
java.lang.Object $value = this.booleanField.get();
if ($value == null) {
synchronized (this.booleanField) {
value = this.booleanField.get();
if (value == null) {
$value = this.booleanField.get();
if ($value == null) {
final boolean actualValue = true;
value = actualValue;
this.booleanField.set(value);
$value = actualValue;
this.booleanField.set($value);
}
}
}
return (java.lang.Boolean) value;
return (java.lang.Boolean) $value;
}
@java.lang.SuppressWarnings({"all", "unchecked"})
public byte getByteField() {
java.lang.Object value = this.byteField.get();
if (value == null) {
java.lang.Object $value = this.byteField.get();
if ($value == null) {
synchronized (this.byteField) {
value = this.byteField.get();
if (value == null) {
$value = this.byteField.get();
if ($value == null) {
final byte actualValue = 1;
value = actualValue;
this.byteField.set(value);
$value = actualValue;
this.byteField.set($value);
}
}
}
return (java.lang.Byte) value;
return (java.lang.Byte) $value;
}
@java.lang.SuppressWarnings({"all", "unchecked"})
public short getShortField() {
java.lang.Object value = this.shortField.get();
if (value == null) {
java.lang.Object $value = this.shortField.get();
if ($value == null) {
synchronized (this.shortField) {
value = this.shortField.get();
if (value == null) {
$value = this.shortField.get();
if ($value == null) {
final short actualValue = 1;
value = actualValue;
this.shortField.set(value);
$value = actualValue;
this.shortField.set($value);
}
}
}
return (java.lang.Short) value;
return (java.lang.Short) $value;
}
@java.lang.SuppressWarnings({"all", "unchecked"})
public int getIntField() {
java.lang.Object value = this.intField.get();
if (value == null) {
java.lang.Object $value = this.intField.get();
if ($value == null) {
synchronized (this.intField) {
value = this.intField.get();
if (value == null) {
$value = this.intField.get();
if ($value == null) {
final int actualValue = 1;
value = actualValue;
this.intField.set(value);
$value = actualValue;
this.intField.set($value);
}
}
}
return (java.lang.Integer) value;
return (java.lang.Integer) $value;
}
@java.lang.SuppressWarnings({"all", "unchecked"})
public long getLongField() {
java.lang.Object value = this.longField.get();
if (value == null) {
java.lang.Object $value = this.longField.get();
if ($value == null) {
synchronized (this.longField) {
value = this.longField.get();
if (value == null) {
$value = this.longField.get();
if ($value == null) {
final long actualValue = 1;
value = actualValue;
this.longField.set(value);
$value = actualValue;
this.longField.set($value);
}
}
}
return (java.lang.Long) value;
return (java.lang.Long) $value;
}
@java.lang.SuppressWarnings({"all", "unchecked"})
public float getFloatField() {
java.lang.Object value = this.floatField.get();
if (value == null) {
java.lang.Object $value = this.floatField.get();
if ($value == null) {
synchronized (this.floatField) {
value = this.floatField.get();
if (value == null) {
$value = this.floatField.get();
if ($value == null) {
final float actualValue = 1.0F;
value = actualValue;
this.floatField.set(value);
$value = actualValue;
this.floatField.set($value);
}
}
}
return (java.lang.Float) value;
return (java.lang.Float) $value;
}
@java.lang.SuppressWarnings({"all", "unchecked"})
public double getDoubleField() {
java.lang.Object value = this.doubleField.get();
if (value == null) {
java.lang.Object $value = this.doubleField.get();
if ($value == null) {
synchronized (this.doubleField) {
value = this.doubleField.get();
if (value == null) {
$value = this.doubleField.get();
if ($value == null) {
final double actualValue = 1.0;
value = actualValue;
this.doubleField.set(value);
$value = actualValue;
this.doubleField.set($value);
}
}
}
return (java.lang.Double) value;
return (java.lang.Double) $value;
}
@java.lang.SuppressWarnings({"all", "unchecked"})
public char getCharField() {
java.lang.Object value = this.charField.get();
if (value == null) {
java.lang.Object $value = this.charField.get();
if ($value == null) {
synchronized (this.charField) {
value = this.charField.get();
if (value == null) {
$value = this.charField.get();
if ($value == null) {
final char actualValue = '1';
value = actualValue;
this.charField.set(value);
$value = actualValue;
this.charField.set($value);
}
}
}
return (java.lang.Character) value;
return (java.lang.Character) $value;
}
@java.lang.SuppressWarnings({"all", "unchecked"})
public int[] getIntArrayField() {
java.lang.Object value = this.intArrayField.get();
if (value == null) {
java.lang.Object $value = this.intArrayField.get();
if ($value == null) {
synchronized (this.intArrayField) {
value = this.intArrayField.get();
if (value == null) {
$value = this.intArrayField.get();
if ($value == null) {
final int[] actualValue = new int[] {1};
value = actualValue == null ? this.intArrayField : actualValue;
this.intArrayField.set(value);
$value = actualValue == null ? this.intArrayField : actualValue;
this.intArrayField.set($value);
}
}
}
return (int[]) (value == this.intArrayField ? null : value);
return (int[]) ($value == this.intArrayField ? null : $value);
}
}
@@ -4,18 +4,18 @@ class GetterLazyTransient {
private final transient int nonLazyTransientField = 3;
@java.lang.SuppressWarnings({"all", "unchecked"})
public int getNonTransientField() {
java.lang.Object value = this.nonTransientField.get();
if (value == null) {
java.lang.Object $value = this.nonTransientField.get();
if ($value == null) {
synchronized (this.nonTransientField) {
value = this.nonTransientField.get();
if (value == null) {
$value = this.nonTransientField.get();
if ($value == null) {
final int actualValue = 1;
value = actualValue;
this.nonTransientField.set(value);
$value = actualValue;
this.nonTransientField.set($value);
}
}
}
return (java.lang.Integer) value;
return (java.lang.Integer) $value;
}
@java.lang.SuppressWarnings("all")
public int getNonLazyTransientField() {
@@ -8,17 +8,17 @@ class SkipSuppressWarnings {
@java.lang.SuppressWarnings({"unchecked"})
public String getField2() {
java.lang.Object value = this.field2.get();
if (value == null) {
java.lang.Object $value = this.field2.get();
if ($value == null) {
synchronized (this.field2) {
value = this.field2.get();
if (value == null) {
$value = this.field2.get();
if ($value == null) {
final String actualValue = "";
value = actualValue == null ? this.field2 : actualValue;
this.field2.set(value);
$value = actualValue == null ? this.field2 : actualValue;
this.field2.set($value);
}
}
}
return (String) (value == this.field2 ? null : value);
return (String) ($value == this.field2 ? null : $value);
}
}
@@ -10,13 +10,13 @@ class DelegateOnGetter {
super();
}
public @Delegate @java.lang.SuppressWarnings({"all", "unchecked"}) Bar getBar() {
java.lang.Object value = this.bar.get();
if ((value == null))
java.lang.Object $value = this.bar.get();
if (($value == null))
{
synchronized (this.bar)
{
value = this.bar.get();
if ((value == null))
$value = this.bar.get();
if (($value == null))
{
final Bar actualValue = new Bar() {
x() {
@@ -28,12 +28,12 @@ class DelegateOnGetter {
return 42;
}
};
value = ((actualValue == null) ? this.bar : actualValue);
this.bar.set(value);
$value = ((actualValue == null) ? this.bar : actualValue);
this.bar.set($value);
}
}
}
return (Bar) ((value == this.bar) ? null : value);
return (Bar) (($value == this.bar) ? null : $value);
}
public @java.lang.SuppressWarnings("all") int getInt() {
return this.getBar().getInt();
@@ -9,20 +9,20 @@ class GetterLazy {
super();
}
public @java.lang.SuppressWarnings({"all", "unchecked"}) ValueType getFieldName() {
java.lang.Object value = this.fieldName.get();
if ((value == null))
java.lang.Object $value = this.fieldName.get();
if (($value == null))
{
synchronized (this.fieldName)
{
value = this.fieldName.get();
if ((value == null))
$value = this.fieldName.get();
if (($value == null))
{
final ValueType actualValue = new ValueType();
value = ((actualValue == null) ? this.fieldName : actualValue);
this.fieldName.set(value);
$value = ((actualValue == null) ? this.fieldName : actualValue);
this.fieldName.set($value);
}
}
}
return (ValueType) ((value == this.fieldName) ? null : value);
return (ValueType) (($value == this.fieldName) ? null : $value);
}
}
@@ -18,107 +18,107 @@ class GetterLazyArguments {
return null;
}
public @java.lang.SuppressWarnings({"all", "unchecked"}) String getField1() {
java.lang.Object value = this.field1.get();
if ((value == null))
java.lang.Object $value = this.field1.get();
if (($value == null))
{
synchronized (this.field1)
{
value = this.field1.get();
if ((value == null))
$value = this.field1.get();
if (($value == null))
{
final String actualValue = stringInt("a", 1);
value = ((actualValue == null) ? this.field1 : actualValue);
this.field1.set(value);
$value = ((actualValue == null) ? this.field1 : actualValue);
this.field1.set($value);
}
}
}
return (String) ((value == this.field1) ? null : value);
return (String) (($value == this.field1) ? null : $value);
}
public @java.lang.SuppressWarnings({"all", "unchecked"}) String getField2() {
java.lang.Object value = this.field2.get();
if ((value == null))
java.lang.Object $value = this.field2.get();
if (($value == null))
{
synchronized (this.field2)
{
value = this.field2.get();
if ((value == null))
$value = this.field2.get();
if (($value == null))
{
final String actualValue = stringInt((true ? "a" : "b"), (true ? 1 : 0));
value = ((actualValue == null) ? this.field2 : actualValue);
this.field2.set(value);
$value = ((actualValue == null) ? this.field2 : actualValue);
this.field2.set($value);
}
}
}
return (String) ((value == this.field2) ? null : value);
return (String) (($value == this.field2) ? null : $value);
}
public @java.lang.SuppressWarnings({"all", "unchecked"}) String getField3() {
java.lang.Object value = this.field3.get();
if ((value == null))
java.lang.Object $value = this.field3.get();
if (($value == null))
{
synchronized (this.field3)
{
value = this.field3.get();
if ((value == null))
$value = this.field3.get();
if (($value == null))
{
final String actualValue = stringInt("a", (true ? 1 : 0));
value = ((actualValue == null) ? this.field3 : actualValue);
this.field3.set(value);
$value = ((actualValue == null) ? this.field3 : actualValue);
this.field3.set($value);
}
}
}
return (String) ((value == this.field3) ? null : value);
return (String) (($value == this.field3) ? null : $value);
}
public @java.lang.SuppressWarnings({"all", "unchecked"}) String getField4() {
java.lang.Object value = this.field4.get();
if ((value == null))
java.lang.Object $value = this.field4.get();
if (($value == null))
{
synchronized (this.field4)
{
value = this.field4.get();
if ((value == null))
$value = this.field4.get();
if (($value == null))
{
final String actualValue = stringRunnable(fun(), () -> {
});
value = ((actualValue == null) ? this.field4 : actualValue);
this.field4.set(value);
$value = ((actualValue == null) ? this.field4 : actualValue);
this.field4.set($value);
}
}
}
return (String) ((value == this.field4) ? null : value);
return (String) (($value == this.field4) ? null : $value);
}
public @java.lang.SuppressWarnings({"all", "unchecked"}) String getField5() {
java.lang.Object value = this.field5.get();
if ((value == null))
java.lang.Object $value = this.field5.get();
if (($value == null))
{
synchronized (this.field5)
{
value = this.field5.get();
if ((value == null))
$value = this.field5.get();
if (($value == null))
{
final String actualValue = stringRunnable("a", () -> {
});
value = ((actualValue == null) ? this.field5 : actualValue);
this.field5.set(value);
$value = ((actualValue == null) ? this.field5 : actualValue);
this.field5.set($value);
}
}
}
return (String) ((value == this.field5) ? null : value);
return (String) (($value == this.field5) ? null : $value);
}
public @java.lang.SuppressWarnings({"all", "unchecked"}) String getField6() {
java.lang.Object value = this.field6.get();
if ((value == null))
java.lang.Object $value = this.field6.get();
if (($value == null))
{
synchronized (this.field6)
{
value = this.field6.get();
if ((value == null))
$value = this.field6.get();
if (($value == null))
{
final String actualValue = (true ? stringInt((true ? "a" : "b"), (true ? 1 : 0)) : "");
value = ((actualValue == null) ? this.field6 : actualValue);
this.field6.set(value);
$value = ((actualValue == null) ? this.field6 : actualValue);
this.field6.set($value);
}
}
}
return (String) ((value == this.field6) ? null : value);
return (String) (($value == this.field6) ? null : $value);
}
}
@@ -8,38 +8,38 @@
return true;
}
public @java.lang.SuppressWarnings({"all", "unchecked"}) boolean isBooleanValue() {
java.lang.Object value = this.booleanValue.get();
if ((value == null))
java.lang.Object $value = this.booleanValue.get();
if (($value == null))
{
synchronized (this.booleanValue)
{
value = this.booleanValue.get();
if ((value == null))
$value = this.booleanValue.get();
if (($value == null))
{
final boolean actualValue = calculateBoolean();
value = actualValue;
this.booleanValue.set(value);
$value = actualValue;
this.booleanValue.set($value);
}
}
}
return (java.lang.Boolean) value;
return (java.lang.Boolean) $value;
}
public @java.lang.SuppressWarnings({"all", "unchecked"}) boolean isOtherBooleanValue() {
java.lang.Object value = this.otherBooleanValue.get();
if ((value == null))
java.lang.Object $value = this.otherBooleanValue.get();
if (($value == null))
{
synchronized (this.otherBooleanValue)
{
value = this.otherBooleanValue.get();
if ((value == null))
$value = this.otherBooleanValue.get();
if (($value == null))
{
final boolean actualValue = (! calculateBoolean());
value = actualValue;
this.otherBooleanValue.set(value);
$value = actualValue;
this.otherBooleanValue.set($value);
}
}
}
return (java.lang.Boolean) value;
return (java.lang.Boolean) $value;
}
public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) {
if ((o == this))
@@ -5,21 +5,21 @@
super();
}
public @java.lang.SuppressWarnings({"all", "unchecked"}) String getValue() {
java.lang.Object value = this.value.get();
if ((value == null))
java.lang.Object $value = this.value.get();
if (($value == null))
{
synchronized (this.value)
{
value = this.value.get();
if ((value == null))
$value = this.value.get();
if (($value == null))
{
final String actualValue = "";
value = ((actualValue == null) ? this.value : actualValue);
this.value.set(value);
$value = ((actualValue == null) ? this.value : actualValue);
this.value.set($value);
}
}
}
return (String) ((value == this.value) ? null : value);
return (String) (($value == this.value) ? null : $value);
}
public @java.lang.SuppressWarnings("all") String getValue2() {
return this.value2;
@@ -8,37 +8,37 @@ class GetterLazyGenerics<E> {
return null;
}
public @java.lang.SuppressWarnings({"all", "unchecked"}) E getField() {
java.lang.Object value = this.field.get();
if ((value == null))
java.lang.Object $value = this.field.get();
if (($value == null))
{
synchronized (this.field)
{
value = this.field.get();
if ((value == null))
$value = this.field.get();
if (($value == null))
{
final E actualValue = getAny();
value = ((actualValue == null) ? this.field : actualValue);
this.field.set(value);
$value = ((actualValue == null) ? this.field : actualValue);
this.field.set($value);
}
}
}
return (E) ((value == this.field) ? null : 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))
java.lang.Object $value = this.field2.get();
if (($value == null))
{
synchronized (this.field2)
{
value = this.field2.get();
if ((value == null))
$value = this.field2.get();
if (($value == null))
{
final long actualValue = System.currentTimeMillis();
value = actualValue;
this.field2.set(value);
$value = actualValue;
this.field2.set($value);
}
}
}
return (java.lang.Long) value;
return (java.lang.Long) $value;
}
}
@@ -7,21 +7,21 @@ public class GetterLazyInAnonymousClass {
super();
}
public @java.lang.SuppressWarnings({"all", "unchecked"}) String getString() {
java.lang.Object value = this.string.get();
if ((value == null))
java.lang.Object $value = this.string.get();
if (($value == null))
{
synchronized (this.string)
{
value = this.string.get();
if ((value == null))
$value = this.string.get();
if (($value == null))
{
final String actualValue = "test";
value = ((actualValue == null) ? this.string : actualValue);
this.string.set(value);
$value = ((actualValue == null) ? this.string : actualValue);
this.string.set($value);
}
}
}
return (String) ((value == this.string) ? null : value);
return (String) (($value == this.string) ? null : $value);
}
}
x() {
@@ -12,156 +12,156 @@ class GetterLazyNative {
super();
}
public @java.lang.SuppressWarnings({"all", "unchecked"}) boolean isBooleanField() {
java.lang.Object value = this.booleanField.get();
if ((value == null))
java.lang.Object $value = this.booleanField.get();
if (($value == null))
{
synchronized (this.booleanField)
{
value = this.booleanField.get();
if ((value == null))
$value = this.booleanField.get();
if (($value == null))
{
final boolean actualValue = true;
value = actualValue;
this.booleanField.set(value);
$value = actualValue;
this.booleanField.set($value);
}
}
}
return (java.lang.Boolean) value;
return (java.lang.Boolean) $value;
}
public @java.lang.SuppressWarnings({"all", "unchecked"}) byte getByteField() {
java.lang.Object value = this.byteField.get();
if ((value == null))
java.lang.Object $value = this.byteField.get();
if (($value == null))
{
synchronized (this.byteField)
{
value = this.byteField.get();
if ((value == null))
$value = this.byteField.get();
if (($value == null))
{
final byte actualValue = 1;
value = actualValue;
this.byteField.set(value);
$value = actualValue;
this.byteField.set($value);
}
}
}
return (java.lang.Byte) value;
return (java.lang.Byte) $value;
}
public @java.lang.SuppressWarnings({"all", "unchecked"}) short getShortField() {
java.lang.Object value = this.shortField.get();
if ((value == null))
java.lang.Object $value = this.shortField.get();
if (($value == null))
{
synchronized (this.shortField)
{
value = this.shortField.get();
if ((value == null))
$value = this.shortField.get();
if (($value == null))
{
final short actualValue = 1;
value = actualValue;
this.shortField.set(value);
$value = actualValue;
this.shortField.set($value);
}
}
}
return (java.lang.Short) value;
return (java.lang.Short) $value;
}
public @java.lang.SuppressWarnings({"all", "unchecked"}) int getIntField() {
java.lang.Object value = this.intField.get();
if ((value == null))
java.lang.Object $value = this.intField.get();
if (($value == null))
{
synchronized (this.intField)
{
value = this.intField.get();
if ((value == null))
$value = this.intField.get();
if (($value == null))
{
final int actualValue = 1;
value = actualValue;
this.intField.set(value);
$value = actualValue;
this.intField.set($value);
}
}
}
return (java.lang.Integer) value;
return (java.lang.Integer) $value;
}
public @java.lang.SuppressWarnings({"all", "unchecked"}) long getLongField() {
java.lang.Object value = this.longField.get();
if ((value == null))
java.lang.Object $value = this.longField.get();
if (($value == null))
{
synchronized (this.longField)
{
value = this.longField.get();
if ((value == null))
$value = this.longField.get();
if (($value == null))
{
final long actualValue = 1;
value = actualValue;
this.longField.set(value);
$value = actualValue;
this.longField.set($value);
}
}
}
return (java.lang.Long) value;
return (java.lang.Long) $value;
}
public @java.lang.SuppressWarnings({"all", "unchecked"}) float getFloatField() {
java.lang.Object value = this.floatField.get();
if ((value == null))
java.lang.Object $value = this.floatField.get();
if (($value == null))
{
synchronized (this.floatField)
{
value = this.floatField.get();
if ((value == null))
$value = this.floatField.get();
if (($value == null))
{
final float actualValue = 1.0f;
value = actualValue;
this.floatField.set(value);
$value = actualValue;
this.floatField.set($value);
}
}
}
return (java.lang.Float) value;
return (java.lang.Float) $value;
}
public @java.lang.SuppressWarnings({"all", "unchecked"}) double getDoubleField() {
java.lang.Object value = this.doubleField.get();
if ((value == null))
java.lang.Object $value = this.doubleField.get();
if (($value == null))
{
synchronized (this.doubleField)
{
value = this.doubleField.get();
if ((value == null))
$value = this.doubleField.get();
if (($value == null))
{
final double actualValue = 1.0;
value = actualValue;
this.doubleField.set(value);
$value = actualValue;
this.doubleField.set($value);
}
}
}
return (java.lang.Double) value;
return (java.lang.Double) $value;
}
public @java.lang.SuppressWarnings({"all", "unchecked"}) char getCharField() {
java.lang.Object value = this.charField.get();
if ((value == null))
java.lang.Object $value = this.charField.get();
if (($value == null))
{
synchronized (this.charField)
{
value = this.charField.get();
if ((value == null))
$value = this.charField.get();
if (($value == null))
{
final char actualValue = '1';
value = actualValue;
this.charField.set(value);
$value = actualValue;
this.charField.set($value);
}
}
}
return (java.lang.Character) value;
return (java.lang.Character) $value;
}
public @java.lang.SuppressWarnings({"all", "unchecked"}) int[] getIntArrayField() {
java.lang.Object value = this.intArrayField.get();
if ((value == null))
java.lang.Object $value = this.intArrayField.get();
if (($value == null))
{
synchronized (this.intArrayField)
{
value = this.intArrayField.get();
if ((value == null))
$value = this.intArrayField.get();
if (($value == null))
{
final int[] actualValue = new int[]{1};
value = ((actualValue == null) ? this.intArrayField : actualValue);
this.intArrayField.set(value);
$value = ((actualValue == null) ? this.intArrayField : actualValue);
this.intArrayField.set($value);
}
}
}
return (int[]) ((value == this.intArrayField) ? null : value);
return (int[]) (($value == this.intArrayField) ? null : $value);
}
}
@@ -6,21 +6,21 @@ class GetterLazyTransient {
super();
}
public @java.lang.SuppressWarnings({"all", "unchecked"}) int getNonTransientField() {
java.lang.Object value = this.nonTransientField.get();
if ((value == null))
java.lang.Object $value = this.nonTransientField.get();
if (($value == null))
{
synchronized (this.nonTransientField)
{
value = this.nonTransientField.get();
if ((value == null))
$value = this.nonTransientField.get();
if (($value == null))
{
final int actualValue = 1;
value = actualValue;
this.nonTransientField.set(value);
$value = actualValue;
this.nonTransientField.set($value);
}
}
}
return (java.lang.Integer) value;
return (java.lang.Integer) $value;
}
public @java.lang.SuppressWarnings("all") int getNonLazyTransientField() {
return this.nonLazyTransientField;
@@ -8,20 +8,20 @@ class SkipSuppressWarnings {
return this.field;
}
public @java.lang.SuppressWarnings({"unchecked"}) String getField2() {
java.lang.Object value = this.field2.get();
if ((value == null))
java.lang.Object $value = this.field2.get();
if (($value == null))
{
synchronized (this.field2)
{
value = this.field2.get();
if ((value == null))
$value = this.field2.get();
if (($value == null))
{
final String actualValue = "";
value = ((actualValue == null) ? this.field2 : actualValue);
this.field2.set(value);
$value = ((actualValue == null) ? this.field2 : actualValue);
this.field2.set($value);
}
}
}
return (String) ((value == this.field2) ? null : value);
return (String) (($value == this.field2) ? null : $value);
}
}