From de816ebbcde3daea556e250c85723c867221016f Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Tue, 14 Apr 2015 21:54:04 +0200 Subject: [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. --- test/transform/resource/after-delombok/UtilityClass.java | 2 +- test/transform/resource/after-ecj/UtilityClass.java | 10 +++++++++- test/transform/resource/after-ecj/UtilityClassErrors.java | 2 ++ test/transform/resource/before/UtilityClass.java | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) (limited to 'test') 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(); + () { + } 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; + () { + } 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; + () { + } 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; + () { + } 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; + () { + } 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(); -- cgit