diff options
Diffstat (limited to 'test/transform/resource')
30 files changed, 217 insertions, 1 deletions
diff --git a/test/transform/resource/after-delombok/LoggerCommons.java b/test/transform/resource/after-delombok/LoggerCommons.java index 954e730b..4b943da7 100644 --- a/test/transform/resource/after-delombok/LoggerCommons.java +++ b/test/transform/resource/after-delombok/LoggerCommons.java @@ -10,3 +10,8 @@ class LoggerCommonsWithDifferentName { @java.lang.SuppressWarnings("all") private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog("DifferentName"); } +class LoggerCommonsWithStaticField { + @java.lang.SuppressWarnings("all") + private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(LoggerCommonsWithStaticField.TOPIC); + static final String TOPIC = "StaticField"; +}
\ No newline at end of file diff --git a/test/transform/resource/after-delombok/LoggerCustomWithTopicAndName.java b/test/transform/resource/after-delombok/LoggerCustomWithTopicAndName.java index abb785b9..4db02cc1 100644 --- a/test/transform/resource/after-delombok/LoggerCustomWithTopicAndName.java +++ b/test/transform/resource/after-delombok/LoggerCustomWithTopicAndName.java @@ -3,6 +3,12 @@ class LoggerCustomLog { private static final MyLoggerFactory log = MyLoggerFactory.create(LoggerCustomLog.class.getName(), "t", null, LoggerCustomLog.class, "t"); } +class LoggerCustomLogWithStaticField { + @java.lang.SuppressWarnings("all") + private static final MyLoggerFactory log = MyLoggerFactory.create(LoggerCustomLogWithStaticField.class.getName(), LoggerCustomLogWithStaticField.TOPIC, null, LoggerCustomLogWithStaticField.class, LoggerCustomLogWithStaticField.TOPIC); + static final String TOPIC = "StaticField"; +} + class MyLoggerFactory { static MyLoggerFactory create(String name, String t1, Object o, Class<?> clazz, String t2) { return null; diff --git a/test/transform/resource/after-delombok/LoggerJBossLog.java b/test/transform/resource/after-delombok/LoggerJBossLog.java index 41c18805..5fd98aa6 100644 --- a/test/transform/resource/after-delombok/LoggerJBossLog.java +++ b/test/transform/resource/after-delombok/LoggerJBossLog.java @@ -17,3 +17,9 @@ class LoggerJBossLogWithDifferentLoggerName { @java.lang.SuppressWarnings("all") private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger("DifferentLogger"); } + +class LoggerJBossLogWithStaticField { + @java.lang.SuppressWarnings("all") + private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(LoggerJBossLogWithStaticField.TOPIC); + static final String TOPIC = "StaticField"; +}
\ No newline at end of file diff --git a/test/transform/resource/after-delombok/LoggerJul.java b/test/transform/resource/after-delombok/LoggerJul.java index 63f96733..cfb44fde 100644 --- a/test/transform/resource/after-delombok/LoggerJul.java +++ b/test/transform/resource/after-delombok/LoggerJul.java @@ -10,3 +10,8 @@ class LoggerJulWithDifferentName { @java.lang.SuppressWarnings("all") private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger("DifferentName"); } +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"; +}
\ No newline at end of file diff --git a/test/transform/resource/after-delombok/LoggerLog4j.java b/test/transform/resource/after-delombok/LoggerLog4j.java index 7d9d4409..cef83621 100644 --- a/test/transform/resource/after-delombok/LoggerLog4j.java +++ b/test/transform/resource/after-delombok/LoggerLog4j.java @@ -10,3 +10,8 @@ class LoggerLog4jWithDifferentName { @java.lang.SuppressWarnings("all") private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger("DifferentName"); } +class LoggerLog4jWithStaticField { + @java.lang.SuppressWarnings("all") + private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(LoggerLog4jWithStaticField.TOPIC); + static final String TOPIC = "StaticField"; +} diff --git a/test/transform/resource/after-delombok/LoggerLog4j2.java b/test/transform/resource/after-delombok/LoggerLog4j2.java index 3d8b7b5b..b32c7722 100644 --- a/test/transform/resource/after-delombok/LoggerLog4j2.java +++ b/test/transform/resource/after-delombok/LoggerLog4j2.java @@ -10,3 +10,8 @@ class LoggerLog4j2WithDifferentName { @java.lang.SuppressWarnings("all") private static final org.apache.logging.log4j.Logger log = org.apache.logging.log4j.LogManager.getLogger("DifferentName"); } +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"; +}
\ No newline at end of file diff --git a/test/transform/resource/after-delombok/LoggerSlf4j.java b/test/transform/resource/after-delombok/LoggerSlf4j.java index 68d685f0..70f11ae4 100644 --- a/test/transform/resource/after-delombok/LoggerSlf4j.java +++ b/test/transform/resource/after-delombok/LoggerSlf4j.java @@ -17,3 +17,20 @@ class LoggerSlf4jWithDifferentLoggerName { @java.lang.SuppressWarnings("all") private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger("DifferentLogger"); } + +class LoggerSlf4jWithStaticField { + @java.lang.SuppressWarnings("all") + private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LoggerSlf4jWithStaticField.TOPIC); + static final String TOPIC = "StaticField"; +} + +class LoggerSlf4jWithTwoStaticFields { + @java.lang.SuppressWarnings("all") + private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LoggerSlf4jWithTwoStaticFields.TOPIC + LoggerSlf4jWithTwoStaticFields.TOPIC); + static final String TOPIC = "StaticField"; +} + +class LoggerSlf4jWithTwoLiterals { + @java.lang.SuppressWarnings("all") + private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger("A" + "B"); +}
\ No newline at end of file diff --git a/test/transform/resource/after-delombok/LoggerSlf4jInvalidTopic.java b/test/transform/resource/after-delombok/LoggerSlf4jInvalidTopic.java new file mode 100644 index 00000000..86e6ae2c --- /dev/null +++ b/test/transform/resource/after-delombok/LoggerSlf4jInvalidTopic.java @@ -0,0 +1,5 @@ +import lombok.extern.slf4j.Slf4j; + +@Slf4j(topic = 42) +class LoggerSlf4jWithIntegerTopic { +}
\ No newline at end of file diff --git a/test/transform/resource/after-delombok/LoggerXSlf4j.java b/test/transform/resource/after-delombok/LoggerXSlf4j.java index 781733cf..ba0ec3f8 100644 --- a/test/transform/resource/after-delombok/LoggerXSlf4j.java +++ b/test/transform/resource/after-delombok/LoggerXSlf4j.java @@ -10,3 +10,8 @@ class LoggerXSlf4jWithDifferentName { @java.lang.SuppressWarnings("all") private static final org.slf4j.ext.XLogger log = org.slf4j.ext.XLoggerFactory.getXLogger("DifferentName"); } +class LoggerXSlf4jWithStaticField { + @java.lang.SuppressWarnings("all") + private static final org.slf4j.ext.XLogger log = org.slf4j.ext.XLoggerFactory.getXLogger(LoggerXSlf4jWithStaticField.TOPIC); + static final String TOPIC = "StaticField"; +}
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/LoggerCommons.java b/test/transform/resource/after-ecj/LoggerCommons.java index df102a12..b2ca055f 100644 --- a/test/transform/resource/after-ecj/LoggerCommons.java +++ b/test/transform/resource/after-ecj/LoggerCommons.java @@ -22,4 +22,13 @@ import lombok.extern.apachecommons.CommonsLog; LoggerCommonsWithDifferentName() { super(); } +} +@CommonsLog(topic = LoggerCommonsWithStaticField.TOPIC) class LoggerCommonsWithStaticField { + private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(LoggerCommonsWithStaticField.TOPIC); + static final String TOPIC = "StaticField"; + <clinit>() { + } + LoggerCommonsWithStaticField() { + super(); + } }
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/LoggerCustomWithTopicAndName.java b/test/transform/resource/after-ecj/LoggerCustomWithTopicAndName.java index 91cf6d8d..f6f85744 100644 --- a/test/transform/resource/after-ecj/LoggerCustomWithTopicAndName.java +++ b/test/transform/resource/after-ecj/LoggerCustomWithTopicAndName.java @@ -6,6 +6,15 @@ super(); } } +@lombok.CustomLog(topic = LoggerCustomLogWithStaticField.TOPIC) class LoggerCustomLogWithStaticField { + private static final MyLoggerFactory log = MyLoggerFactory.create(LoggerCustomLogWithStaticField.class.getName(), LoggerCustomLogWithStaticField.TOPIC, null, LoggerCustomLogWithStaticField.class, LoggerCustomLogWithStaticField.TOPIC); + static final String TOPIC = "StaticField"; + <clinit>() { + } + LoggerCustomLogWithStaticField() { + super(); + } +} class MyLoggerFactory { MyLoggerFactory() { super(); diff --git a/test/transform/resource/after-ecj/LoggerJBossLog.java b/test/transform/resource/after-ecj/LoggerJBossLog.java index e5c35708..c47f6c9e 100644 --- a/test/transform/resource/after-ecj/LoggerJBossLog.java +++ b/test/transform/resource/after-ecj/LoggerJBossLog.java @@ -35,4 +35,13 @@ class LoggerJBossLogOuter { LoggerJBossLogWithDifferentLoggerName() { super(); } +} +@JBossLog(topic = LoggerJBossLogWithStaticField.TOPIC) class LoggerJBossLogWithStaticField { + private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(LoggerJBossLogWithStaticField.TOPIC); + static final String TOPIC = "StaticField"; + <clinit>() { + } + LoggerJBossLogWithStaticField() { + super(); + } }
\ 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 8aa4f59a..20cc5407 100644 --- a/test/transform/resource/after-ecj/LoggerJul.java +++ b/test/transform/resource/after-ecj/LoggerJul.java @@ -22,4 +22,13 @@ import lombok.extern.java.Log; LoggerJulWithDifferentName() { super(); } +} +@Log(topic = LoggerJulWithStaticField.TOPIC) class LoggerJulWithStaticField { + private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(LoggerJulWithStaticField.TOPIC); + static final String TOPIC = "StaticField"; + <clinit>() { + } + LoggerJulWithStaticField() { + super(); + } }
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/LoggerLog4j.java b/test/transform/resource/after-ecj/LoggerLog4j.java index 948412e2..e7d6c813 100644 --- a/test/transform/resource/after-ecj/LoggerLog4j.java +++ b/test/transform/resource/after-ecj/LoggerLog4j.java @@ -22,4 +22,13 @@ import lombok.extern.log4j.Log4j; LoggerLog4jWithDifferentName() { super(); } +} +@Log4j(topic = LoggerLog4jWithStaticField.TOPIC) class LoggerLog4jWithStaticField { + private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(LoggerLog4jWithStaticField.TOPIC); + static final String TOPIC = "StaticField"; + <clinit>() { + } + LoggerLog4jWithStaticField() { + super(); + } }
\ 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 c2fcd428..88def98d 100644 --- a/test/transform/resource/after-ecj/LoggerLog4j2.java +++ b/test/transform/resource/after-ecj/LoggerLog4j2.java @@ -22,4 +22,13 @@ import lombok.extern.log4j.Log4j2; LoggerLog4j2WithDifferentName() { super(); } +} +@Log4j2(topic = LoggerLog4j2WithStaticField.TOPIC) class LoggerLog4j2WithStaticField { + private static final org.apache.logging.log4j.Logger log = org.apache.logging.log4j.LogManager.getLogger(LoggerLog4j2WithStaticField.TOPIC); + static final String TOPIC = "StaticField"; + <clinit>() { + } + LoggerLog4j2WithStaticField() { + super(); + } }
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/LoggerSlf4j.java b/test/transform/resource/after-ecj/LoggerSlf4j.java index 9c5405cb..c303a895 100644 --- a/test/transform/resource/after-ecj/LoggerSlf4j.java +++ b/test/transform/resource/after-ecj/LoggerSlf4j.java @@ -36,4 +36,31 @@ class LoggerSlf4jOuter { LoggerSlf4jWithDifferentLoggerName() { super(); } +} + +@Slf4j(topic = LoggerSlf4jWithStaticField.TOPIC) class LoggerSlf4jWithStaticField { + private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LoggerSlf4jWithStaticField.TOPIC); + static final String TOPIC = "StaticField"; + <clinit>() { + } + LoggerSlf4jWithStaticField() { + super(); + } +} +@Slf4j(topic = (LoggerSlf4jWithTwoStaticFields.TOPIC + LoggerSlf4jWithTwoStaticFields.TOPIC)) class LoggerSlf4jWithTwoStaticFields { + private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger((LoggerSlf4jWithTwoStaticFields.TOPIC + LoggerSlf4jWithTwoStaticFields.TOPIC)); + static final String TOPIC = "StaticField"; + <clinit>() { + } + LoggerSlf4jWithTwoStaticFields() { + super(); + } +} +@Slf4j(topic = ExtendedStringLiteral{AB}) class LoggerSlf4jWithTwoLiterals { + private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger("AB"); + <clinit>() { + } + LoggerSlf4jWithTwoLiterals() { + super(); + } }
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/LoggerSlf4jInvalidTopic.java b/test/transform/resource/after-ecj/LoggerSlf4jInvalidTopic.java new file mode 100644 index 00000000..33e212e3 --- /dev/null +++ b/test/transform/resource/after-ecj/LoggerSlf4jInvalidTopic.java @@ -0,0 +1,9 @@ +import lombok.extern.slf4j.Slf4j; +@Slf4j(topic = 42) class LoggerSlf4jWithIntegerTopic { + private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(42); + <clinit>() { + } + LoggerSlf4jWithIntegerTopic() { + super(); + } +}
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/LoggerXSlf4j.java b/test/transform/resource/after-ecj/LoggerXSlf4j.java index 916859a4..04acdd77 100644 --- a/test/transform/resource/after-ecj/LoggerXSlf4j.java +++ b/test/transform/resource/after-ecj/LoggerXSlf4j.java @@ -22,4 +22,13 @@ import lombok.extern.slf4j.XSlf4j; LoggerXSlf4jWithDifferentName() { super(); } -}
\ No newline at end of file +} +@XSlf4j(topic = LoggerXSlf4jWithStaticField.TOPIC) class LoggerXSlf4jWithStaticField { + private static final org.slf4j.ext.XLogger log = org.slf4j.ext.XLoggerFactory.getXLogger(LoggerXSlf4jWithStaticField.TOPIC); + static final String TOPIC = "StaticField"; + <clinit>() { + } + LoggerXSlf4jWithStaticField() { + super(); + } +} diff --git a/test/transform/resource/before/LoggerCommons.java b/test/transform/resource/before/LoggerCommons.java index 00419d00..e209c1d0 100644 --- a/test/transform/resource/before/LoggerCommons.java +++ b/test/transform/resource/before/LoggerCommons.java @@ -11,3 +11,8 @@ class LoggerCommonsWithImport { @CommonsLog(topic="DifferentName") class LoggerCommonsWithDifferentName { } + +@CommonsLog(topic=LoggerCommonsWithStaticField.TOPIC) +class LoggerCommonsWithStaticField { + static final String TOPIC = "StaticField"; +}
\ No newline at end of file diff --git a/test/transform/resource/before/LoggerCustomWithTopicAndName.java b/test/transform/resource/before/LoggerCustomWithTopicAndName.java index b40ed86a..5b803217 100644 --- a/test/transform/resource/before/LoggerCustomWithTopicAndName.java +++ b/test/transform/resource/before/LoggerCustomWithTopicAndName.java @@ -3,6 +3,11 @@ class LoggerCustomLog { } +@lombok.CustomLog(topic=LoggerCustomLogWithStaticField.TOPIC) +class LoggerCustomLogWithStaticField { + static final String TOPIC = "StaticField"; +} + class MyLoggerFactory { static MyLoggerFactory create(String name, String t1, Object o, Class<?> clazz, String t2) { return null; diff --git a/test/transform/resource/before/LoggerJBossLog.java b/test/transform/resource/before/LoggerJBossLog.java index fbd88177..f3480867 100644 --- a/test/transform/resource/before/LoggerJBossLog.java +++ b/test/transform/resource/before/LoggerJBossLog.java @@ -17,4 +17,9 @@ class LoggerJBossLogOuter { @JBossLog(topic="DifferentLogger") class LoggerJBossLogWithDifferentLoggerName { +} + +@JBossLog(topic=LoggerJBossLogWithStaticField.TOPIC) +class LoggerJBossLogWithStaticField { + static final String TOPIC = "StaticField"; }
\ No newline at end of file diff --git a/test/transform/resource/before/LoggerJul.java b/test/transform/resource/before/LoggerJul.java index 006cc344..7b10d015 100644 --- a/test/transform/resource/before/LoggerJul.java +++ b/test/transform/resource/before/LoggerJul.java @@ -10,4 +10,9 @@ class LoggerJulWithImport { @Log(topic="DifferentName") class LoggerJulWithDifferentName { +} + +@Log(topic=LoggerJulWithStaticField.TOPIC) +class LoggerJulWithStaticField { + static final String TOPIC = "StaticField"; }
\ No newline at end of file diff --git a/test/transform/resource/before/LoggerLog4j.java b/test/transform/resource/before/LoggerLog4j.java index 351049c5..b7086a05 100644 --- a/test/transform/resource/before/LoggerLog4j.java +++ b/test/transform/resource/before/LoggerLog4j.java @@ -10,4 +10,9 @@ class LoggerLog4jWithImport { @Log4j(topic="DifferentName") class LoggerLog4jWithDifferentName { +} + +@Log4j(topic=LoggerLog4jWithStaticField.TOPIC) +class LoggerLog4jWithStaticField { + static final String TOPIC = "StaticField"; }
\ No newline at end of file diff --git a/test/transform/resource/before/LoggerLog4j2.java b/test/transform/resource/before/LoggerLog4j2.java index c9cf9412..10b3aae5 100644 --- a/test/transform/resource/before/LoggerLog4j2.java +++ b/test/transform/resource/before/LoggerLog4j2.java @@ -10,4 +10,9 @@ class LoggerLog4j2WithImport { @Log4j2(topic="DifferentName") class LoggerLog4j2WithDifferentName { +} + +@Log4j2(topic=LoggerLog4j2WithStaticField.TOPIC) +class LoggerLog4j2WithStaticField { + static final String TOPIC = "StaticField"; }
\ No newline at end of file diff --git a/test/transform/resource/before/LoggerSlf4j.java b/test/transform/resource/before/LoggerSlf4j.java index 1113a63e..3f8284e8 100644 --- a/test/transform/resource/before/LoggerSlf4j.java +++ b/test/transform/resource/before/LoggerSlf4j.java @@ -17,4 +17,18 @@ class LoggerSlf4jOuter { @Slf4j(topic="DifferentLogger") class LoggerSlf4jWithDifferentLoggerName { +} + +@Slf4j(topic=LoggerSlf4jWithStaticField.TOPIC) +class LoggerSlf4jWithStaticField { + static final String TOPIC = "StaticField"; +} + +@Slf4j(topic=LoggerSlf4jWithTwoStaticFields.TOPIC + LoggerSlf4jWithTwoStaticFields.TOPIC) +class LoggerSlf4jWithTwoStaticFields { + static final String TOPIC = "StaticField"; +} + +@Slf4j(topic="A"+"B") +class LoggerSlf4jWithTwoLiterals { }
\ No newline at end of file diff --git a/test/transform/resource/before/LoggerSlf4jInvalidTopic.java b/test/transform/resource/before/LoggerSlf4jInvalidTopic.java new file mode 100644 index 00000000..eed02f01 --- /dev/null +++ b/test/transform/resource/before/LoggerSlf4jInvalidTopic.java @@ -0,0 +1,5 @@ +import lombok.extern.slf4j.Slf4j; + +@Slf4j(topic=42) +class LoggerSlf4jWithIntegerTopic { +}
\ No newline at end of file diff --git a/test/transform/resource/before/LoggerXSlf4j.java b/test/transform/resource/before/LoggerXSlf4j.java index a8bcb0c3..f70f2e2d 100644 --- a/test/transform/resource/before/LoggerXSlf4j.java +++ b/test/transform/resource/before/LoggerXSlf4j.java @@ -10,4 +10,9 @@ class LoggerXSlf4jWithImport { @XSlf4j(topic="DifferentName") class LoggerXSlf4jWithDifferentName { +} + +@XSlf4j(topic=LoggerXSlf4jWithStaticField.TOPIC) +class LoggerXSlf4jWithStaticField { + static final String TOPIC = "StaticField"; }
\ No newline at end of file diff --git a/test/transform/resource/messages-delombok/LoggerSlf4jInvalidTopic.java.messages b/test/transform/resource/messages-delombok/LoggerSlf4jInvalidTopic.java.messages new file mode 100644 index 00000000..8de0a120 --- /dev/null +++ b/test/transform/resource/messages-delombok/LoggerSlf4jInvalidTopic.java.messages @@ -0,0 +1,2 @@ +3 incompatible types: int cannot be converted to java.lang.String +-1 not flagged modified
\ No newline at end of file diff --git a/test/transform/resource/messages-ecj/LoggerSlf4jInvalidTopic.java.messages b/test/transform/resource/messages-ecj/LoggerSlf4jInvalidTopic.java.messages new file mode 100644 index 00000000..9bc2a82b --- /dev/null +++ b/test/transform/resource/messages-ecj/LoggerSlf4jInvalidTopic.java.messages @@ -0,0 +1 @@ +3 Type mismatch: cannot convert from int to String
\ No newline at end of file diff --git a/test/transform/resource/messages-idempotent/LoggerSlf4jInvalidTopic.java.messages b/test/transform/resource/messages-idempotent/LoggerSlf4jInvalidTopic.java.messages new file mode 100644 index 00000000..d894fad1 --- /dev/null +++ b/test/transform/resource/messages-idempotent/LoggerSlf4jInvalidTopic.java.messages @@ -0,0 +1 @@ +3 incompatible types: int cannot be converted to java.lang.String
\ No newline at end of file |