diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2015-04-14 21:54:04 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2015-04-14 21:54:04 +0200 |
commit | de816ebbcde3daea556e250c85723c867221016f (patch) | |
tree | c3eb3b93df8082d94a1cf5edfe7c173717359d58 /test | |
parent | a4441fb931fe1711d410b3b769e0f140b8c9670e (diff) | |
download | lombok-de816ebbcde3daea556e250c85723c867221016f.tar.gz lombok-de816ebbcde3daea556e250c85723c867221016f.tar.bz2 lombok-de816ebbcde3daea556e250c85723c867221016f.zip |
[i804] @UtilityClass fails to properly initialize fields (which @UtilityClass makes static) with initializers, in eclipse.
also updates the changelog more generally, it was lacking some recent work.
Diffstat (limited to 'test')
4 files changed, 13 insertions, 3 deletions
diff --git a/test/transform/resource/after-delombok/UtilityClass.java b/test/transform/resource/after-delombok/UtilityClass.java index eb7eef09..7731b49c 100644 --- a/test/transform/resource/after-delombok/UtilityClass.java +++ b/test/transform/resource/after-delombok/UtilityClass.java @@ -1,5 +1,5 @@ final class UtilityClass { - private static String someField; + private static long someField = System.currentTimeMillis(); static void someMethod() { System.out.println(); } diff --git a/test/transform/resource/after-ecj/UtilityClass.java b/test/transform/resource/after-ecj/UtilityClass.java index e8db6a21..81d5d9e6 100644 --- a/test/transform/resource/after-ecj/UtilityClass.java +++ b/test/transform/resource/after-ecj/UtilityClass.java @@ -5,7 +5,9 @@ final @lombok.experimental.UtilityClass class UtilityClass { super(); } } - private static String someField; + private static long someField = System.currentTimeMillis(); + <clinit>() { + } static void someMethod() { System.out.println(); } @@ -18,6 +20,8 @@ class UtilityInner { static class InnerInner { static final @lombok.experimental.UtilityClass class InnerInnerInner { static int member; + <clinit>() { + } private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") InnerInnerInner() { super(); throw new java.lang.UnsupportedOperationException("This is a utility class and cannot be instantiated"); @@ -30,6 +34,8 @@ class UtilityInner { enum UtilityInsideEnum { static final @lombok.experimental.UtilityClass class InsideEnum { static int member; + <clinit>() { + } private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") InsideEnum() { super(); throw new java.lang.UnsupportedOperationException("This is a utility class and cannot be instantiated"); @@ -46,6 +52,8 @@ class UtilityInner { interface UtilityInsideInterface { final @lombok.experimental.UtilityClass class InsideInterface { static int member; + <clinit>() { + } private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") InsideInterface() { super(); throw new java.lang.UnsupportedOperationException("This is a utility class and cannot be instantiated"); diff --git a/test/transform/resource/after-ecj/UtilityClassErrors.java b/test/transform/resource/after-ecj/UtilityClassErrors.java index 26b331a1..b5a51313 100644 --- a/test/transform/resource/after-ecj/UtilityClassErrors.java +++ b/test/transform/resource/after-ecj/UtilityClassErrors.java @@ -1,5 +1,7 @@ final @lombok.experimental.UtilityClass class UtilityClassErrors1 { private static String someField; + <clinit>() { + } protected UtilityClassErrors1() { super(); } diff --git a/test/transform/resource/before/UtilityClass.java b/test/transform/resource/before/UtilityClass.java index 0f9875f0..016a166e 100644 --- a/test/transform/resource/before/UtilityClass.java +++ b/test/transform/resource/before/UtilityClass.java @@ -1,6 +1,6 @@ @lombok.experimental.UtilityClass class UtilityClass { - private String someField; + private long someField = System.currentTimeMillis(); void someMethod() { System.out.println(); |