Skip to content

Commit bddd2ce

Browse files
committed
extra eol
1 parent 575473d commit bddd2ce

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

validator-generator/src/main/java/io/avaje/validation/generator/AdapterHelper.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,25 @@ static void writeAdapterWithValues(
3333

3434
if (!typeUse1.isEmpty()
3535
&& (isAssignable2Interface(genericType.topType(), "java.lang.Iterable"))) {
36-
writer.eol().append("%s .list()", indent);
36+
writer.append("%s .list()", indent);
3737
final var t = genericType.firstParamType();
3838
writeTypeUse(writer, indent, t, typeUse1, genericType);
3939

4040
} else if ((!typeUse1.isEmpty() || !typeUse2.isEmpty())
4141
&& "java.util.Map".equals(genericType.topType())) {
4242

43-
writer.eol().append("%s .mapKeys()", indent);
43+
writer.append("%s .mapKeys()", indent);
4444
writeTypeUse(writer, indent, genericType.firstParamType(), typeUse1, genericType);
4545

46-
writer.eol().append("%s .mapValues()", indent);
46+
writer.append("%s .mapValues()", indent);
4747
writeTypeUse(writer, indent, genericType.secondParamType(), typeUse2, false, genericType);
4848

4949
} else if (genericType.topType().contains("[]") && hasValid) {
5050

51-
writer.eol().append("%s .array()", indent);
51+
writer.append("%s .array()", indent);
5252
writeTypeUse(writer, indent, genericType.firstParamType(), typeUse1, genericType);
5353
} else if (hasValid) {
5454
writer
55-
.eol()
5655
.append(
5756
"%s .andThen(ctx.adapter(%s.class))",
5857
indent, Util.shortName(genericType.topType()));
@@ -85,7 +84,7 @@ private static void writeTypeUse(
8584
}
8685
final var k = a.getKey().shortName();
8786
final var v = a.getValue();
88-
writer.eol().append("%s .andThenMulti(ctx.adapter(%s.class,%s))", indent, k, v);
87+
writer.append("%s .andThenMulti(ctx.adapter(%s.class,%s))", indent, k, v);
8988
}
9089

9190
if (!Util.isBasicType(paramType)
@@ -94,7 +93,6 @@ private static void writeTypeUse(
9493
.anyMatch(Constants.VALID_ANNOTATIONS::contains)) {
9594

9695
writer
97-
.eol()
9896
.append(
9997
"%s .andThenMulti(ctx.adapter(%s.class))",
10098
indent,

0 commit comments

Comments
 (0)