mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 02:14:44 +00:00
Fix custom logger when topic presence != allowance
This commit is contained in:
1 parent
06004b933b
commit
2a98c4d1fd
2 files changed
+10
No files matched your search
@@ -88,6 +88,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 = "";
|
||||
}
|
||||
|
||||
ClassLiteralAccess loggingType = selfType(owner, source);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user