Skip to content

Commit

Permalink
Bug fix - return filtered staged builders
Browse files Browse the repository at this point in the history
  • Loading branch information
olsavmic committed Jun 7, 2024
1 parent df0f722 commit 7b29c3b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,8 @@ private void addStaticStagedBuilderMethod(String builderMethodName) {
codeBlock.addStatement("() -> $L", uniqueVarName);
IntStream.range(0, filteredRecordComponents.size()).forEach(__ -> codeBlock.unindent().addStatement("}"));

var returnType = stagedBuilderType(recordComponents.isEmpty() ? builderClassType : recordComponents.get(0));
var returnType = stagedBuilderType(
filteredRecordComponents.isEmpty() ? builderClassType : filteredRecordComponents.get(0));

var methodSpec = MethodSpec.methodBuilder(builderMethodName)
.addJavadoc("Return the first stage of a staged builder\n")
Expand Down

0 comments on commit 7b29c3b

Please sign in to comment.