aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/eclipse/handlers
diff options
context:
space:
mode:
authorReinier Zwitserloot <r.zwitserloot@projectlombok.org>2019-07-09 00:43:28 +0200
committerGitHub <noreply@github.com>2019-07-09 00:43:28 +0200
commit5ad6796b182c8071fe747493ed2f9ad2443dc212 (patch)
tree41c9e1a65c990bac926ed029cc43966a91037cd9 /src/core/lombok/eclipse/handlers
parent7fe489686716e72983d2c3586c7e2e1e07200ba7 (diff)
parent2a98c4d1fd80ff0b3181da4fe8d5f3f32f168644 (diff)
downloadlombok-5ad6796b182c8071fe747493ed2f9ad2443dc212.tar.gz
lombok-5ad6796b182c8071fe747493ed2f9ad2443dc212.tar.bz2
lombok-5ad6796b182c8071fe747493ed2f9ad2443dc212.zip
Merge pull request #2136 from ataccama/customlog
Fixes for CustomLog, AUTHORS entry, extended changlog
Diffstat (limited to 'src/core/lombok/eclipse/handlers')
-rw-r--r--src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java2
-rw-r--r--src/core/lombok/eclipse/handlers/HandleFieldNameConstants.java2
-rw-r--r--src/core/lombok/eclipse/handlers/HandleLog.java5
3 files changed, 7 insertions, 2 deletions
diff --git a/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java b/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java
index c8e7b60a..f04c541f 100644
--- a/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java
+++ b/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java
@@ -760,7 +760,7 @@ public class EclipseHandlerUtil {
TypeReference typeRef = annotation.type;
boolean match = false;
if (typeRef != null && typeRef.getTypeName() != null) {
- for (TypeName cn : configuredCopyable) if (typeMatches(cn.toString(), node, typeRef)) {
+ for (TypeName cn : configuredCopyable) if (cn != null && typeMatches(cn.toString(), node, typeRef)) {
result.add(annotation);
match = true;
break;
diff --git a/src/core/lombok/eclipse/handlers/HandleFieldNameConstants.java b/src/core/lombok/eclipse/handlers/HandleFieldNameConstants.java
index 710a26f8..2db7591c 100644
--- a/src/core/lombok/eclipse/handlers/HandleFieldNameConstants.java
+++ b/src/core/lombok/eclipse/handlers/HandleFieldNameConstants.java
@@ -135,7 +135,7 @@ public class HandleFieldNameConstants extends EclipseAnnotationHandler<FieldName
TypeDeclaration parent = (TypeDeclaration) typeNode.get();
EclipseNode fieldsType = findInnerClass(typeNode, innerTypeName.getName());
boolean genConstr = false, genClinit = false;
- char[] name = innerTypeName.getName().toCharArray();
+ char[] name = innerTypeName.getCharArray();
TypeDeclaration generatedInnerType = null;
if (fieldsType == null) {
generatedInnerType = new TypeDeclaration(parent.compilationResult);
diff --git a/src/core/lombok/eclipse/handlers/HandleLog.java b/src/core/lombok/eclipse/handlers/HandleLog.java
index 3dc9536d..7a140193 100644
--- a/src/core/lombok/eclipse/handlers/HandleLog.java
+++ b/src/core/lombok/eclipse/handlers/HandleLog.java
@@ -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);