aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorCaleb Brinkman <cbrinkman@sonatype.com>2019-10-28 13:48:59 -0500
committerCaleb Brinkman <cbrinkman@sonatype.com>2019-10-28 13:48:59 -0500
commitb7e42d13ea98e280914f09f91fc03f355ea9682b (patch)
treefa56202bf1c89cea527ee619f42da4983fef5785 /src/core
parent1b0c2f34a50531e2af4d8c88ff196a9526e00ac8 (diff)
downloadlombok-b7e42d13ea98e280914f09f91fc03f355ea9682b.tar.gz
lombok-b7e42d13ea98e280914f09f91fc03f355ea9682b.tar.bz2
lombok-b7e42d13ea98e280914f09f91fc03f355ea9682b.zip
Fix last test
Diffstat (limited to 'src/core')
-rw-r--r--src/core/lombok/javac/handlers/HandleBuilder.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/lombok/javac/handlers/HandleBuilder.java b/src/core/lombok/javac/handlers/HandleBuilder.java
index a7235a40..46cb9b9a 100644
--- a/src/core/lombok/javac/handlers/HandleBuilder.java
+++ b/src/core/lombok/javac/handlers/HandleBuilder.java
@@ -826,13 +826,6 @@ public class HandleBuilder extends JavacAnnotationHandler<Builder> {
private void makePrefixedSetterMethodForBuilder(CheckerFrameworkVersion cfv, JavacNode builderType, boolean deprecate, JavacNode fieldNode, Name paramName, Name nameOfSetFlag, JavacNode source, boolean fluent, boolean chain, List<JCAnnotation> annosOnParam, JavacNode originalFieldNode, AccessLevel access, String prefix) {
Name fieldName = ((JCVariableDecl) fieldNode.get()).name;
- for (JavacNode child : builderType.down()) {
- if (child.getKind() != Kind.METHOD) continue;
- JCMethodDecl methodDecl = (JCMethodDecl) child.get();
- Name existingName = methodDecl.name;
- if (existingName.equals(fieldName) && !isTolerate(fieldNode, methodDecl)) return;
- }
-
String setterPrefix = prefix.isEmpty() ? "set" : prefix;
String setterName;
if(fluent) {
@@ -841,6 +834,13 @@ public class HandleBuilder extends JavacAnnotationHandler<Builder> {
setterName = HandlerUtil.buildAccessorName(setterPrefix, paramName.toString());
}
+ for (JavacNode child : builderType.down()) {
+ if (child.getKind() != Kind.METHOD) continue;
+ JCMethodDecl methodDecl = (JCMethodDecl) child.get();
+ Name existingName = methodDecl.name;
+ if (existingName.equals(builderType.toName(setterName)) && !isTolerate(fieldNode, methodDecl)) return;
+ }
+
JavacTreeMaker maker = fieldNode.getTreeMaker();
List<JCAnnotation> methodAnns = JavacHandlerUtil.findCopyableToSetterAnnotations(originalFieldNode);