Fixes for CustomLog, AUTHORS entry, extended changlog

This commit is contained in:
Adam Juraszek committed 2019-05-22 18:36:42 +02:00
1 parent 7fe4896867
commit 06004b933b
7 files changed
+8 -6

No files matched your search

+1
View File
@@ -1,5 +1,6 @@
Lombok contributors in alphabetical order:
Adam Juraszek <juriad@gmail.com>
Bulgakov Alexander <buls@yandex.ru>
Christian Nüssgens <christian@nuessgens.com>
Christian Sterzl <christian.sterzl@gmail.com>
+1
View File
@@ -3,6 +3,7 @@ Lombok Changelog
### v1.18.9 "Edgy Guinea Pig"
* FEATURE: You can now configure a custom logger framework using the new `@CustomLog` annotation in combination with the `lombok.log.custom.declaration` configuration key. See the [log documentation](https://projectlombok.org/features/Log) for more information. [Pullrequest #2086](https://github.com/rzwitserloot/lombok/pull/2086) with thanks to Adam Juraszek.
* IMPROBABLE BREAKING CHANGE: Stricter validation of configuration keys dealing with identifiers and types (`lombok.log.fieldName`, `lombok.fieldNameConstants.innerTypeName`, `lombok.copyableAnnotations`).
### v1.18.8 (May 7th, 2019)
* FEATURE: You can now configure `@FieldNameConstants` to `CONSTANT_CASE` the generated constants, using a `lombok.config` option. See the [FieldNameConstants documentation](https://projectlombok.org/features/experimental/FieldNameConstants). [Issue #2092](https://github.com/rzwitserloot/lombok/issues/2092).
@@ -34,7 +34,7 @@ public final class TypeName implements ConfigurationValueType {
if (name == null || name.trim().isEmpty()) return null;
String trimmedName = name.trim();
for (String identifier : trimmedName.split(".")) {
for (String identifier : trimmedName.split("\\.")) {
if (!JavaIdentifiers.isValidJavaIdentifier(identifier)) throw new IllegalArgumentException("Invalid type name " + trimmedName + " (part " + identifier + ")");
}
return new TypeName(trimmedName);
@@ -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;
@@ -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);
@@ -1450,7 +1450,7 @@ public class JavacHandlerUtil {
java.util.List<TypeName> configuredCopyable = node.getAst().readConfiguration(ConfigurationKeys.COPYABLE_ANNOTATIONS);
if (!annoName.isEmpty()) {
for (TypeName cn : configuredCopyable) if (typeMatches(cn.toString(), node, anno.annotationType)) return List.of(anno);
for (TypeName cn : configuredCopyable) if (cn != null && typeMatches(cn.toString(), node, anno.annotationType)) return List.of(anno);
for (String bn : BASE_COPYABLE_ANNOTATIONS) if (typeMatches(bn, node, anno.annotationType)) return List.of(anno);
}
@@ -1459,7 +1459,7 @@ public class JavacHandlerUtil {
if (child.getKind() == Kind.ANNOTATION) {
JCAnnotation annotation = (JCAnnotation) child.get();
boolean match = false;
for (TypeName cn : configuredCopyable) if (typeMatches(cn.toString(), node, annotation.annotationType)) {
for (TypeName cn : configuredCopyable) if (cn != null && typeMatches(cn.toString(), node, annotation.annotationType)) {
result.append(annotation);
match = true;
break;
+1 -1
View File
@@ -15,7 +15,7 @@
<@f.overview>
<p>
You put the variant of <code>@Log</code> on your class (whichever one applies to the logging system you use); you then have a static final <code>log</code> field, initialized as is the commonly proscribed way for the logging framework you use, which you can then use to write log statements.
You put the variant of <code>@Log</code> on your class (whichever one applies to the logging system you use); you then have a static final <code>log</code> field, initialized as is the commonly prescribed way for the logging framework you use, which you can then use to write log statements.
</p><p>
There are several choices available:<br />
<dl>