File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed
test/framework/src/main/java/org/elasticsearch/index/mapper Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments