aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-ecj/GetterLazyTransient.java
blob: 7e5f4a416fd93d47132e572ba3f65d6b33735cc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
class GetterLazyTransient {
  private final @lombok.Getter(lazy = true) java.util.concurrent.atomic.AtomicReference<java.lang.Object> nonTransientField = new java.util.concurrent.atomic.AtomicReference<java.lang.Object>();
  private final transient @lombok.Getter(lazy = true) int transientField = 2;
  private final transient @lombok.Getter int nonLazyTransientField = 3;
  GetterLazyTransient() {
    super();
  }
  public @java.lang.SuppressWarnings({"all", "unchecked"}) int getNonTransientField() {
    java.lang.Object value = this.nonTransientField.get();
    if ((value == null))
        {
          synchronized (this.nonTransientField)
            {
              value = this.nonTransientField.get();
              if ((value == null))
                  {
                    final int actualValue = 1;
                    value = actualValue;
                    this.nonTransientField.set(value);
                  }
            }
        }
    return (java.lang.Integer) value;
  }
  public @java.lang.SuppressWarnings("all") int getNonLazyTransientField() {
    return this.nonLazyTransientField;
  }
}