From 13fbad00e070b57f616727b2ae35bfc81674dbe3 Mon Sep 17 00:00:00 2001 From: varkart <44122128+varkart@users.noreply.github.com> Date: Thu, 17 Feb 2022 13:05:09 -0500 Subject: [fixes #2990, #3069] flogger logger enum test cases --- .../resource/after-delombok/LoggerFlogger.java | 12 +++++++++++ .../resource/after-ecj/LoggerFlogger.java | 23 ++++++++++++++++++++++ test/transform/resource/before/LoggerFlogger.java | 12 +++++++++++ 3 files changed, 47 insertions(+) (limited to 'test') diff --git a/test/transform/resource/after-delombok/LoggerFlogger.java b/test/transform/resource/after-delombok/LoggerFlogger.java index 41d49fe4..0fe8083a 100644 --- a/test/transform/resource/after-delombok/LoggerFlogger.java +++ b/test/transform/resource/after-delombok/LoggerFlogger.java @@ -12,3 +12,15 @@ class LoggerFloggerOuter { private static final com.google.common.flogger.FluentLogger log = com.google.common.flogger.FluentLogger.forEnclosingClass(); } } +enum LoggerFloggerWithEnum { + CONSTANT; + @java.lang.SuppressWarnings("all") + private static final com.google.common.flogger.FluentLogger log = com.google.common.flogger.FluentLogger.forEnclosingClass(); +} +class LoggerFloggerWithInnerEnum { + enum Inner { + CONSTANT; + @java.lang.SuppressWarnings("all") + private static final com.google.common.flogger.FluentLogger log = com.google.common.flogger.FluentLogger.forEnclosingClass(); + } +} diff --git a/test/transform/resource/after-ecj/LoggerFlogger.java b/test/transform/resource/after-ecj/LoggerFlogger.java index d0526eee..b97082ff 100644 --- a/test/transform/resource/after-ecj/LoggerFlogger.java +++ b/test/transform/resource/after-ecj/LoggerFlogger.java @@ -28,3 +28,26 @@ class LoggerFloggerOuter { super(); } } +@Flogger enum LoggerFloggerWithEnum { + CONSTANT(), + private static final com.google.common.flogger.FluentLogger log = com.google.common.flogger.FluentLogger.forEnclosingClass(); + () { + } + LoggerFloggerWithEnum() { + super(); + } +} +class LoggerFloggerWithInnerEnum { + @Flogger enum Inner { + CONSTANT(), + private static final com.google.common.flogger.FluentLogger log = com.google.common.flogger.FluentLogger.forEnclosingClass(); + () { + } + Inner() { + super(); + } + } + LoggerFloggerWithInnerEnum() { + super(); + } +} diff --git a/test/transform/resource/before/LoggerFlogger.java b/test/transform/resource/before/LoggerFlogger.java index b143aae9..ff0249c7 100644 --- a/test/transform/resource/before/LoggerFlogger.java +++ b/test/transform/resource/before/LoggerFlogger.java @@ -14,3 +14,15 @@ class LoggerFloggerOuter { } } + +@Flogger +enum LoggerFloggerWithEnum { + CONSTANT; +} + +class LoggerFloggerWithInnerEnum { + @Flogger + enum Inner { + CONSTANT; + } +} \ No newline at end of file -- cgit From 082ac2c3755f92ef964aee43b75fbaedc248ef1a Mon Sep 17 00:00:00 2001 From: varkart <44122128+varkart@users.noreply.github.com> Date: Thu, 17 Feb 2022 13:05:35 -0500 Subject: [fixes #2990, #3069] jboss logger enum test cases --- .../resource/after-delombok/LoggerJBossLog.java | 12 +++++++++++ .../resource/after-ecj/LoggerJBossLog.java | 23 ++++++++++++++++++++++ test/transform/resource/before/LoggerJBossLog.java | 12 +++++++++++ 3 files changed, 47 insertions(+) (limited to 'test') diff --git a/test/transform/resource/after-delombok/LoggerJBossLog.java b/test/transform/resource/after-delombok/LoggerJBossLog.java index 5fd98aa6..1f2a240f 100644 --- a/test/transform/resource/after-delombok/LoggerJBossLog.java +++ b/test/transform/resource/after-delombok/LoggerJBossLog.java @@ -12,6 +12,18 @@ class LoggerJBossLogOuter { private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(Inner.class); } } +enum LoggerJBossLogWithEnum { + CONSTANT; + @java.lang.SuppressWarnings("all") + private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(LoggerJBossLogWithEnum.class); +} +class LoggerJBossLogWithInnerEnum { + enum Inner { + CONSTANT; + @java.lang.SuppressWarnings("all") + private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(Inner.class); + } +} class LoggerJBossLogWithDifferentLoggerName { @java.lang.SuppressWarnings("all") diff --git a/test/transform/resource/after-ecj/LoggerJBossLog.java b/test/transform/resource/after-ecj/LoggerJBossLog.java index c47f6c9e..13d332a6 100644 --- a/test/transform/resource/after-ecj/LoggerJBossLog.java +++ b/test/transform/resource/after-ecj/LoggerJBossLog.java @@ -28,6 +28,29 @@ class LoggerJBossLogOuter { super(); } } +@JBossLog enum LoggerJBossLogWithEnum { + CONSTANT(), + private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(LoggerJBossLogWithEnum.class); + () { + } + LoggerJBossLogWithEnum() { + super(); + } +} +class LoggerJBossLogWithInnerEnum { + @JBossLog enum Inner { + CONSTANT(), + private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(Inner.class); + () { + } + Inner() { + super(); + } + } + LoggerJBossLogWithInnerEnum() { + super(); + } +} @JBossLog(topic = "DifferentLogger") class LoggerJBossLogWithDifferentLoggerName { private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger("DifferentLogger"); () { diff --git a/test/transform/resource/before/LoggerJBossLog.java b/test/transform/resource/before/LoggerJBossLog.java index f3480867..a26a0f7b 100644 --- a/test/transform/resource/before/LoggerJBossLog.java +++ b/test/transform/resource/before/LoggerJBossLog.java @@ -15,6 +15,18 @@ class LoggerJBossLogOuter { } } +@JBossLog +enum LoggerJBossLogWithEnum { + CONSTANT; +} + +class LoggerJBossLogWithInnerEnum { + @JBossLog + enum Inner { + CONSTANT; + } +} + @JBossLog(topic="DifferentLogger") class LoggerJBossLogWithDifferentLoggerName { } -- cgit From 0f3cff22881cd2e95e9f71f71cac571d1d23be47 Mon Sep 17 00:00:00 2001 From: varkart <44122128+varkart@users.noreply.github.com> Date: Thu, 17 Feb 2022 13:05:55 -0500 Subject: [fixes #2990, #3069] jul logger enum test cases --- .../resource/after-delombok/LoggerJul.java | 13 ++++++++++++ test/transform/resource/after-ecj/LoggerJul.java | 23 ++++++++++++++++++++++ test/transform/resource/before/LoggerJul.java | 12 +++++++++++ 3 files changed, 48 insertions(+) (limited to 'test') diff --git a/test/transform/resource/after-delombok/LoggerJul.java b/test/transform/resource/after-delombok/LoggerJul.java index cfb44fde..471e614c 100644 --- a/test/transform/resource/after-delombok/LoggerJul.java +++ b/test/transform/resource/after-delombok/LoggerJul.java @@ -14,4 +14,17 @@ class LoggerJulWithStaticField { @java.lang.SuppressWarnings("all") private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(LoggerJulWithStaticField.TOPIC); static final String TOPIC = "StaticField"; +} +enum LoggerJulWithEnum { + CONSTANT; + @java.lang.SuppressWarnings("all") + private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(LoggerJulWithEnum.class.getName()); +} +class LoggerJulWithInnerEnum { + + enum Inner { + CONSTANT; + @java.lang.SuppressWarnings("all") + private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(Inner.class.getName()); + } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/LoggerJul.java b/test/transform/resource/after-ecj/LoggerJul.java index 20cc5407..d1408245 100644 --- a/test/transform/resource/after-ecj/LoggerJul.java +++ b/test/transform/resource/after-ecj/LoggerJul.java @@ -31,4 +31,27 @@ import lombok.extern.java.Log; LoggerJulWithStaticField() { super(); } +} +@Log enum LoggerJulWithEnum { + CONSTANT(), + private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(LoggerJulWithEnum.class.getName()); + () { + } + LoggerJulWithEnum() { + super(); + } +} +class LoggerJulWithInnerEnum { + @Log enum Inner { + CONSTANT(), + private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(Inner.class.getName()); + () { + } + Inner() { + super(); + } + } + LoggerJulWithInnerEnum() { + super(); + } } \ No newline at end of file diff --git a/test/transform/resource/before/LoggerJul.java b/test/transform/resource/before/LoggerJul.java index 7b10d015..24fcdcde 100644 --- a/test/transform/resource/before/LoggerJul.java +++ b/test/transform/resource/before/LoggerJul.java @@ -15,4 +15,16 @@ class LoggerJulWithDifferentName { @Log(topic=LoggerJulWithStaticField.TOPIC) class LoggerJulWithStaticField { static final String TOPIC = "StaticField"; +} + +@Log +enum LoggerJulWithEnum { + CONSTANT; +} + +class LoggerJulWithInnerEnum { + @Log + enum Inner { + CONSTANT; + } } \ No newline at end of file -- cgit From 9967246598b32556e04bb326b5e0d415a2e3e6ae Mon Sep 17 00:00:00 2001 From: varkart <44122128+varkart@users.noreply.github.com> Date: Thu, 17 Feb 2022 13:06:20 -0500 Subject: [fixes #2990, #3069] log4j logger enum test cases --- .../resource/after-delombok/LoggerLog4j.java | 13 ++++++++++++ test/transform/resource/after-ecj/LoggerLog4j.java | 23 ++++++++++++++++++++++ test/transform/resource/before/LoggerLog4j.java | 12 +++++++++++ 3 files changed, 48 insertions(+) (limited to 'test') diff --git a/test/transform/resource/after-delombok/LoggerLog4j.java b/test/transform/resource/after-delombok/LoggerLog4j.java index cef83621..c07e14fa 100644 --- a/test/transform/resource/after-delombok/LoggerLog4j.java +++ b/test/transform/resource/after-delombok/LoggerLog4j.java @@ -15,3 +15,16 @@ class LoggerLog4jWithStaticField { private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(LoggerLog4jWithStaticField.TOPIC); static final String TOPIC = "StaticField"; } +enum LoggerLog4jWithEnum { + CONSTANT; + @java.lang.SuppressWarnings("all") + private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(LoggerLog4jWithEnum.class); +} +class LoggerLog4jWithInnerEnum { + + enum Inner { + CONSTANT; + @java.lang.SuppressWarnings("all") + private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(Inner.class); + } +} diff --git a/test/transform/resource/after-ecj/LoggerLog4j.java b/test/transform/resource/after-ecj/LoggerLog4j.java index e7d6c813..4d67b133 100644 --- a/test/transform/resource/after-ecj/LoggerLog4j.java +++ b/test/transform/resource/after-ecj/LoggerLog4j.java @@ -31,4 +31,27 @@ import lombok.extern.log4j.Log4j; LoggerLog4jWithStaticField() { super(); } +} +@Log4j enum LoggerLog4jWithEnum { + CONSTANT(), + private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(LoggerLog4jWithEnum.class); + () { + } + LoggerLog4jWithEnum() { + super(); + } +} +class LoggerLog4jWithInnerEnum { + @Log4j enum Inner { + CONSTANT(), + private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(Inner.class); + () { + } + Inner() { + super(); + } + } + LoggerLog4jWithInnerEnum() { + super(); + } } \ No newline at end of file diff --git a/test/transform/resource/before/LoggerLog4j.java b/test/transform/resource/before/LoggerLog4j.java index b7086a05..3be24d74 100644 --- a/test/transform/resource/before/LoggerLog4j.java +++ b/test/transform/resource/before/LoggerLog4j.java @@ -15,4 +15,16 @@ class LoggerLog4jWithDifferentName { @Log4j(topic=LoggerLog4jWithStaticField.TOPIC) class LoggerLog4jWithStaticField { static final String TOPIC = "StaticField"; +} + +@Log4j +enum LoggerLog4jWithEnum { + CONSTANT; +} + +class LoggerLog4jWithInnerEnum { + @Log4j + enum Inner { + CONSTANT; + } } \ No newline at end of file -- cgit From 401a5bf7f2937f815bdfd47ccda5d6b97363cade Mon Sep 17 00:00:00 2001 From: varkart <44122128+varkart@users.noreply.github.com> Date: Thu, 17 Feb 2022 13:06:48 -0500 Subject: [fixes #2990, #3069] log4j2 logger enum test cases --- .../resource/after-delombok/LoggerLog4j2.java | 13 ++++++++++++ .../transform/resource/after-ecj/LoggerLog4j2.java | 23 ++++++++++++++++++++++ test/transform/resource/before/LoggerLog4j2.java | 12 +++++++++++ 3 files changed, 48 insertions(+) (limited to 'test') diff --git a/test/transform/resource/after-delombok/LoggerLog4j2.java b/test/transform/resource/after-delombok/LoggerLog4j2.java index cba516f2..5db281be 100644 --- a/test/transform/resource/after-delombok/LoggerLog4j2.java +++ b/test/transform/resource/after-delombok/LoggerLog4j2.java @@ -15,4 +15,17 @@ class LoggerLog4j2WithStaticField { @java.lang.SuppressWarnings("all") private static final org.apache.logging.log4j.Logger log = org.apache.logging.log4j.LogManager.getLogger(LoggerLog4j2WithStaticField.TOPIC); static final String TOPIC = "StaticField"; +} +enum LoggerLog4j2WithEnum { + CONSTANT; + @java.lang.SuppressWarnings("all") + private static final org.apache.logging.log4j.Logger log = org.apache.logging.log4j.LogManager.getLogger(LoggerLog4j2WithEnum.class); +} +class LoggerLog4j2WithInnerEnum { + + enum Inner { + CONSTANT; + @java.lang.SuppressWarnings("all") + private static final org.apache.logging.log4j.Logger log = org.apache.logging.log4j.LogManager.getLogger(Inner.class); + } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/LoggerLog4j2.java b/test/transform/resource/after-ecj/LoggerLog4j2.java index 88def98d..72d4ff5f 100644 --- a/test/transform/resource/after-ecj/LoggerLog4j2.java +++ b/test/transform/resource/after-ecj/LoggerLog4j2.java @@ -31,4 +31,27 @@ import lombok.extern.log4j.Log4j2; LoggerLog4j2WithStaticField() { super(); } +} +@Log4j2 enum LoggerLog4j2WithEnum { + CONSTANT(), + private static final org.apache.logging.log4j.Logger log = org.apache.logging.log4j.LogManager.getLogger(LoggerLog4j2WithEnum.class); + () { + } + LoggerLog4j2WithEnum() { + super(); + } +} +class LoggerLog4j2WithInnerEnum { + @Log4j2 enum Inner { + CONSTANT(), + private static final org.apache.logging.log4j.Logger log = org.apache.logging.log4j.LogManager.getLogger(Inner.class); + () { + } + Inner() { + super(); + } + } + LoggerLog4j2WithInnerEnum() { + super(); + } } \ No newline at end of file diff --git a/test/transform/resource/before/LoggerLog4j2.java b/test/transform/resource/before/LoggerLog4j2.java index 1dd48d7a..bf717cb8 100644 --- a/test/transform/resource/before/LoggerLog4j2.java +++ b/test/transform/resource/before/LoggerLog4j2.java @@ -16,4 +16,16 @@ class LoggerLog4j2WithDifferentName { @Log4j2(topic=LoggerLog4j2WithStaticField.TOPIC) class LoggerLog4j2WithStaticField { static final String TOPIC = "StaticField"; +} + +@Log4j2 +enum LoggerLog4j2WithEnum { + CONSTANT; +} + +class LoggerLog4j2WithInnerEnum { + @Log4j2 + enum Inner { + CONSTANT; + } } \ No newline at end of file -- cgit 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