From 3679fcee8c6023904eb87821d0e3b7ca4f4f74fb Mon Sep 17 00:00:00 2001 From: varkart <44122128+varkart@users.noreply.github.com> Date: Thu, 17 Feb 2022 13:07:14 -0500 Subject: [fixes #2990, #3069] slf4j logger enum test cases --- .../resource/after-delombok/LoggerSlf4j.java | 12 +++++++++++ test/transform/resource/after-ecj/LoggerSlf4j.java | 23 ++++++++++++++++++++++ test/transform/resource/before/LoggerSlf4j.java | 12 +++++++++++ 3 files changed, 47 insertions(+) (limited to 'test') diff --git a/test/transform/resource/after-delombok/LoggerSlf4j.java b/test/transform/resource/after-delombok/LoggerSlf4j.java index 152c8708..099a65ad 100644 --- a/test/transform/resource/after-delombok/LoggerSlf4j.java +++ b/test/transform/resource/after-delombok/LoggerSlf4j.java @@ -6,6 +6,18 @@ class LoggerSlf4jWithImport { @java.lang.SuppressWarnings("all") private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LoggerSlf4jWithImport.class); } +enum LoggerSlf4jWithEnum { + CONSTANT; + @java.lang.SuppressWarnings("all") + private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LoggerSlf4jWithEnum.class); +} +class LoggerSlf4jWithInnerEnum { + enum Inner { + CONSTANT; + @java.lang.SuppressWarnings("all") + private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(Inner.class); + } +} class LoggerSlf4jOuter { static class Inner { @java.lang.SuppressWarnings("all") diff --git a/test/transform/resource/after-ecj/LoggerSlf4j.java b/test/transform/resource/after-ecj/LoggerSlf4j.java index 286d023b..85e49186 100644 --- a/test/transform/resource/after-ecj/LoggerSlf4j.java +++ b/test/transform/resource/after-ecj/LoggerSlf4j.java @@ -15,6 +15,29 @@ import lombok.extern.slf4j.Slf4j; super(); } } +@Slf4j enum LoggerSlf4jWithEnum { + CONSTANT(), + private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LoggerSlf4jWithEnum.class); + () { + } + LoggerSlf4jWithEnum() { + super(); + } +} +class LoggerSlf4jWithInnerEnum { + @Slf4j enum Inner { + CONSTANT(), + private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(Inner.class); + () { + } + Inner() { + super(); + } + } + LoggerSlf4jWithInnerEnum() { + super(); + } +} class LoggerSlf4jOuter { static @lombok.extern.slf4j.Slf4j class Inner { private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(Inner.class); diff --git a/test/transform/resource/before/LoggerSlf4j.java b/test/transform/resource/before/LoggerSlf4j.java index c59db4ee..f6310bf5 100644 --- a/test/transform/resource/before/LoggerSlf4j.java +++ b/test/transform/resource/before/LoggerSlf4j.java @@ -8,6 +8,18 @@ class LoggerSlf4j { class LoggerSlf4jWithImport { } +@Slf4j +enum LoggerSlf4jWithEnum { + CONSTANT; +} + +class LoggerSlf4jWithInnerEnum { + @Slf4j + enum Inner { + CONSTANT; + } +} + class LoggerSlf4jOuter { @lombok.extern.slf4j.Slf4j static class Inner { -- cgit