aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/eclipse/handlers
diff options
context:
space:
mode:
authorJan Rieke <rieke@subshell.com>2021-03-12 20:40:17 +0100
committerJan Rieke <rieke@subshell.com>2021-03-12 20:40:17 +0100
commita6257f27f0831ed2c9971285a3bb29f73fabbb02 (patch)
treebb98c01791cb46d728e36cb44a34854ecfd4005a /src/core/lombok/eclipse/handlers
parent4ba962aae0de64c4063cb5313ed15fe25928e9ca (diff)
downloadlombok-a6257f27f0831ed2c9971285a3bb29f73fabbb02.tar.gz
lombok-a6257f27f0831ed2c9971285a3bb29f73fabbb02.tar.bz2
lombok-a6257f27f0831ed2c9971285a3bb29f73fabbb02.zip
rename method; use null instead of empty string [eclipse]
Diffstat (limited to 'src/core/lombok/eclipse/handlers')
-rwxr-xr-xsrc/core/lombok/eclipse/handlers/HandleBuilder.java4
-rw-r--r--src/core/lombok/eclipse/handlers/HandleSuperBuilder.java6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleBuilder.java b/src/core/lombok/eclipse/handlers/HandleBuilder.java
index 59862f2c..dfb8eab0 100755
--- a/src/core/lombok/eclipse/handlers/HandleBuilder.java
+++ b/src/core/lombok/eclipse/handlers/HandleBuilder.java
@@ -183,14 +183,14 @@ public class HandleBuilder extends EclipseAnnotationHandler<Builder> {
builderMethodName = ann.builderMethodName();
buildMethodName = ann.buildMethodName();
- setBuilderClassName(fixBuilderClassName(node, ann.builderClassName()));
+ setBuilderClassName(getBuilderClassNameTemplate(node, ann.builderClassName()));
toBuilder = ann.toBuilder();
if (builderMethodName == null) builderMethodName = "builder";
if (buildMethodName == null) buildMethodName = "build";
}
- static String fixBuilderClassName(EclipseNode node, String override) {
+ static String getBuilderClassNameTemplate(EclipseNode node, String override) {
if (override != null && !override.isEmpty()) return override;
override = node.getAst().readConfiguration(ConfigurationKeys.BUILDER_CLASS_NAME);
if (override != null && !override.isEmpty()) return override;
diff --git a/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java b/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java
index 41ad77ab..ad7d3fd6 100644
--- a/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java
+++ b/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java
@@ -123,7 +123,7 @@ public class HandleSuperBuilder extends EclipseAnnotationHandler<SuperBuilder> {
if (builderMethodName == null) builderMethodName = "builder";
if (buildMethodName == null) buildMethodName = "build";
- builderClassName = fixBuilderClassName(node, "");
+ builderClassName = getBuilderClassNameTemplate(node, null);
}
EclipseNode builderAbstractType;
@@ -273,7 +273,7 @@ public class HandleSuperBuilder extends EclipseAnnotationHandler<SuperBuilder> {
if (extendsClause instanceof QualifiedTypeReference) {
QualifiedTypeReference qualifiedTypeReference = (QualifiedTypeReference)extendsClause;
char[] superclassClassName = qualifiedTypeReference.getLastToken();
- String builderClassNameTemplate = BuilderJob.fixBuilderClassName(annotationNode, null);
+ String builderClassNameTemplate = BuilderJob.getBuilderClassNameTemplate(annotationNode, null);
String superclassBuilderClassName = job.replaceBuilderClassName(superclassClassName, builderClassNameTemplate);
char[][] tokens = Arrays.copyOf(qualifiedTypeReference.tokens, qualifiedTypeReference.tokens.length + 1);
@@ -291,7 +291,7 @@ public class HandleSuperBuilder extends EclipseAnnotationHandler<SuperBuilder> {
superclassBuilderClass = new ParameterizedQualifiedTypeReference(tokens, typeArgsForTokens, 0, poss);
} else if (extendsClause != null) {
char[] superclassClassName = extendsClause.getTypeName()[0];
- String builderClassNameTemplate = BuilderJob.fixBuilderClassName(annotationNode, "");
+ String builderClassNameTemplate = BuilderJob.getBuilderClassNameTemplate(annotationNode, null);
String superclassBuilderClassName = job.replaceBuilderClassName(superclassClassName, builderClassNameTemplate);
char[][] tokens = new char[][] {superclassClassName, superclassBuilderClassName.toCharArray()};