mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-15 08:17:18 +00:00
[i793] Parameterized static methods with Builder would produce compiler errors in javac.
This commit is contained in:
1 parent
ff3ac90168
commit
49d7986a02
2 files changed
+4
-4
No files matched your search
@@ -2,6 +2,7 @@ Lombok Changelog
|
||||
----------------
|
||||
|
||||
### v1.16.5 "Edgy Guinea Pig"
|
||||
* BUGFIX: Parameterized static methods with `@Builder` would produce compiler errors in javac. [Issue #793](https://code.google.com/p/projectlombok/issues/detail?id=793).
|
||||
|
||||
### v1.16.4 (April 14th, 2015)
|
||||
* BUGFIX: Lombok now works with Eclipse Mars.
|
||||
|
||||
@@ -175,10 +175,10 @@ public class HandleBuilder extends JavacAnnotationHandler<Builder> {
|
||||
typeParams = jmd.typarams;
|
||||
thrownExceptions = jmd.thrown;
|
||||
nameOfStaticBuilderMethod = jmd.name;
|
||||
if (returnType instanceof JCTypeApply) {
|
||||
returnType = ((JCTypeApply) returnType).clazz;
|
||||
}
|
||||
if (builderClassName.isEmpty()) {
|
||||
if (returnType instanceof JCTypeApply) {
|
||||
returnType = ((JCTypeApply) returnType).clazz;
|
||||
}
|
||||
if (returnType instanceof JCFieldAccess) {
|
||||
builderClassName = ((JCFieldAccess) returnType).name.toString() + "Builder";
|
||||
} else if (returnType instanceof JCIdent) {
|
||||
@@ -196,7 +196,6 @@ public class HandleBuilder extends JavacAnnotationHandler<Builder> {
|
||||
if (Character.isLowerCase(builderClassName.charAt(0))) {
|
||||
builderClassName = Character.toTitleCase(builderClassName.charAt(0)) + builderClassName.substring(1);
|
||||
}
|
||||
|
||||
} else {
|
||||
// This shouldn't happen.
|
||||
System.err.println("Lombok bug ID#20140614-1651: javac HandleBuilder: return type to name conversion failed: " + returnType.getClass());
|
||||
|
||||
Reference in new issue
Block a user