diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2014-01-19 07:01:10 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2014-01-19 07:01:10 +0100 |
commit | bc1f91af3a764f0aa81ca441918c16a1d7969a07 (patch) | |
tree | d102b2c0ea81644a89a1aaf80a3ae9d96c17a185 | |
parent | d6ca8d5e81881c69f8f52c33375b07cef24f7d85 (diff) | |
download | lombok-bc1f91af3a764f0aa81ca441918c16a1d7969a07.tar.gz lombok-bc1f91af3a764f0aa81ca441918c16a1d7969a07.tar.bz2 lombok-bc1f91af3a764f0aa81ca441918c16a1d7969a07.zip |
[trivial] added test for logger config keys.
5 files changed, 21 insertions, 4 deletions
diff --git a/src/core/lombok/ConfigurationKeys.java b/src/core/lombok/ConfigurationKeys.java index cd8e0717..022af237 100644 --- a/src/core/lombok/ConfigurationKeys.java +++ b/src/core/lombok/ConfigurationKeys.java @@ -32,8 +32,10 @@ public class ConfigurationKeys { /** * Makes sure all {@link ConfigurationKey}s in this class are loaded. + * + * (Calling the method ensures this class is initialized by the class loader; this is enough to initialize all configuration keys). */ - public static void ensureKeysLoaded() {}; + public static void ensureKeysLoaded() {} // ##### main package features ##### diff --git a/test/transform/resource/after-delombok/LoggerConfig.java b/test/transform/resource/after-delombok/LoggerConfig.java new file mode 100644 index 00000000..ba955638 --- /dev/null +++ b/test/transform/resource/after-delombok/LoggerConfig.java @@ -0,0 +1,4 @@ +class LoggerWithConfig { + @java.lang.SuppressWarnings("all") + private final org.slf4j.Logger myLogger = org.slf4j.LoggerFactory.getLogger(LoggerWithConfig.class); +}
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/LoggerConfig.java b/test/transform/resource/after-ecj/LoggerConfig.java new file mode 100644 index 00000000..907a7167 --- /dev/null +++ b/test/transform/resource/after-ecj/LoggerConfig.java @@ -0,0 +1,6 @@ +@lombok.extern.slf4j.Slf4j class LoggerWithConfig { + private final org.slf4j.Logger myLogger = org.slf4j.LoggerFactory.getLogger(LoggerWithConfig.class); + LoggerWithConfig() { + super(); + } +}
\ No newline at end of file diff --git a/test/transform/resource/before/FlagUsages.java b/test/transform/resource/before/FlagUsages.java index d6cb331a..8fc8b306 100644 --- a/test/transform/resource/before/FlagUsages.java +++ b/test/transform/resource/before/FlagUsages.java @@ -1,8 +1,8 @@ -//conf: lombok.Getter.flagUsage = WARNING -//conf: lombok.experimental.flagUsage = ERROR +//CONF: lombok.Getter.flagUsage = WARNING +//CONF: lombok.experimental.flagUsage = ERROR public class FlagUsages { @lombok.Getter String x; - + @lombok.experimental.Wither String z; public FlagUsages(String x, String y) { diff --git a/test/transform/resource/before/LoggerConfig.java b/test/transform/resource/before/LoggerConfig.java new file mode 100644 index 00000000..14195e03 --- /dev/null +++ b/test/transform/resource/before/LoggerConfig.java @@ -0,0 +1,5 @@ +//CONF: lombok.log.fieldName = myLogger +//CONF: lombok.log.fieldIsStatic = false +@lombok.extern.slf4j.Slf4j +class LoggerWithConfig { +} |