Skip to content

Commit

Permalink
toString improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
h908714124 committed Jun 20, 2024
1 parent 69ca66e commit e740a50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/src/main/java/net/jbock/writing/ImplClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ private MethodSpec generateToString() {
spec.addAnnotation(Override.class);
ParameterSpec joiner = ParameterSpec.builder(StringJoiner.class, "joiner").build();
spec.addStatement("$T $N = new $T($S, $S, $S)", StringJoiner.class, joiner, StringJoiner.class,
", ", "{", "}");
", ", "{ ", " }");
for (int i = 0; i < namedOptions().size(); i++) {
Mapping<Option> m = namedOptions().get(i);
spec.addStatement("$N.add($S + $N)", joiner, m.field().name + ": ", m.field());
Expand Down

0 comments on commit e740a50

Please sign in to comment.