Skip to content

Commit fb0249a

Browse files
committed
Wrong spot
1 parent 53b4bdc commit fb0249a

File tree

1 file changed

+14
-8
lines changed
  • test/framework/src/main/java/org/elasticsearch/index/mapper

1 file changed

+14
-8
lines changed

test/framework/src/main/java/org/elasticsearch/index/mapper/TestBlock.java

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,6 @@ public BooleansBuilder appendBoolean(boolean value) {
4747
add(value);
4848
return this;
4949
}
50-
51-
@Override
52-
public TestBlock build() {
53-
TestBlock result = super.build();
54-
List<?> r = (List<?>) result.values.get(0);
55-
assertThat(r, hasSize(expectedCount));
56-
return result;
57-
}
5850
}
5951
return new BooleansBuilder();
6052
}
@@ -71,6 +63,20 @@ public BytesRefsFromDocValuesBuilder appendBytesRef(BytesRef value) {
7163
add(BytesRef.deepCopyOf(value));
7264
return this;
7365
}
66+
67+
@Override
68+
public TestBlock build() {
69+
TestBlock result = super.build();
70+
List<?> r;
71+
if (result.values.get(0) instanceof List<?> l) {
72+
r = l;
73+
} else {
74+
r = List.of(result.values.get(0));
75+
}
76+
assertThat(r, hasSize(expectedCount));
77+
return result;
78+
}
79+
7480
}
7581
return new BytesRefsFromDocValuesBuilder();
7682
}

0 commit comments

Comments
 (0)