diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/lombok/javac/handlers/HandleBuilder.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/lombok/javac/handlers/HandleBuilder.java b/src/core/lombok/javac/handlers/HandleBuilder.java index 30fec45b..7ef7b859 100644 --- a/src/core/lombok/javac/handlers/HandleBuilder.java +++ b/src/core/lombok/javac/handlers/HandleBuilder.java @@ -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()); |