aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/javac
diff options
context:
space:
mode:
authorAdam Juraszek <Adam.Juraszek@ataccama.com>2019-05-29 19:16:19 +0200
committerAdam Juraszek <Adam.Juraszek@ataccama.com>2019-05-29 19:18:10 +0200
commit2a98c4d1fd80ff0b3181da4fe8d5f3f32f168644 (patch)
tree41c9e1a65c990bac926ed029cc43966a91037cd9 /src/core/lombok/javac
parent06004b933b6afaa58ca753c4c33e8a977f91e294 (diff)
downloadlombok-2a98c4d1fd80ff0b3181da4fe8d5f3f32f168644.tar.gz
lombok-2a98c4d1fd80ff0b3181da4fe8d5f3f32f168644.tar.bz2
lombok-2a98c4d1fd80ff0b3181da4fe8d5f3f32f168644.zip
Fix custom logger when topic presence != allowance
Diffstat (limited to 'src/core/lombok/javac')
-rw-r--r--src/core/lombok/javac/handlers/HandleLog.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/lombok/javac/handlers/HandleLog.java b/src/core/lombok/javac/handlers/HandleLog.java
index 5f0f8c90..522f8576 100644
--- a/src/core/lombok/javac/handlers/HandleLog.java
+++ b/src/core/lombok/javac/handlers/HandleLog.java
@@ -79,6 +79,11 @@ public class HandleLog {
if (loggerTopic != null && loggerTopic.trim().isEmpty()) loggerTopic = null;
if (framework.getDeclaration().getParametersWithTopic() == null && loggerTopic != null) {
annotationNode.addError(framework.getAnnotationAsString() + " does not allow a topic.");
+ loggerTopic = null;
+ }
+ if (framework.getDeclaration().getParametersWithoutTopic() == null && loggerTopic == null) {
+ annotationNode.addError(framework.getAnnotationAsString() + " requires a topic.");
+ loggerTopic = "";
}
JCFieldAccess loggingType = selfType(typeNode);