From dd18f63ee539a362fac2525c48d83ccff7a06dc9 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 16 Jul 2012 23:59:43 +0200 Subject: Fix for issue 396: Static constructors generated for classes with type parameters did not work in javac. --- test/transform/resource/after-delombok/Constructors.java | 14 ++++++++++++++ test/transform/resource/after-ecj/Constructors.java | 11 +++++++++++ test/transform/resource/before/Constructors.java | 4 ++++ 3 files changed, 29 insertions(+) (limited to 'test/transform') diff --git a/test/transform/resource/after-delombok/Constructors.java b/test/transform/resource/after-delombok/Constructors.java index db48b6b8..d4633dbc 100644 --- a/test/transform/resource/after-delombok/Constructors.java +++ b/test/transform/resource/after-delombok/Constructors.java @@ -58,4 +58,18 @@ class RequiredArgsConstructorStaticNameGenerics { public static RequiredArgsConstructorStaticNameGenerics of(final T x) { return new RequiredArgsConstructorStaticNameGenerics(x); } +} +class RequiredArgsConstructorStaticNameGenerics2 { + final Class x; + String name; + + @java.lang.SuppressWarnings("all") + private RequiredArgsConstructorStaticNameGenerics2(final Class x) { + this.x = x; + } + + @java.lang.SuppressWarnings("all") + public static RequiredArgsConstructorStaticNameGenerics2 of(final Class x) { + return new RequiredArgsConstructorStaticNameGenerics2(x); + } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/Constructors.java b/test/transform/resource/after-ecj/Constructors.java index e6dd8a21..e994702f 100644 --- a/test/transform/resource/after-ecj/Constructors.java +++ b/test/transform/resource/after-ecj/Constructors.java @@ -51,4 +51,15 @@ public static @java.lang.SuppressWarnings("all") RequiredArgsConstructorStaticNameGenerics of(final T x) { return new RequiredArgsConstructorStaticNameGenerics(x); } +} +@lombok.RequiredArgsConstructor(staticName = "of") class RequiredArgsConstructorStaticNameGenerics2 { + final Class x; + String name; + private @java.lang.SuppressWarnings("all") RequiredArgsConstructorStaticNameGenerics2(final Class x) { + super(); + this.x = x; + } + public static @java.lang.SuppressWarnings("all") RequiredArgsConstructorStaticNameGenerics2 of(final Class x) { + return new RequiredArgsConstructorStaticNameGenerics2(x); + } } \ No newline at end of file diff --git a/test/transform/resource/before/Constructors.java b/test/transform/resource/before/Constructors.java index 272fa850..d3ed3504 100644 --- a/test/transform/resource/before/Constructors.java +++ b/test/transform/resource/before/Constructors.java @@ -22,3 +22,7 @@ final T x; String name; } +@lombok.RequiredArgsConstructor(staticName="of") class RequiredArgsConstructorStaticNameGenerics2 { + final Class x; + String name; +} -- cgit