File tree Expand file tree Collapse file tree 1 file changed +0
-6
lines changed
server/src/main/java/org/elasticsearch/index/mapper Expand file tree Collapse file tree 1 file changed +0
-6
lines changed Original file line number Diff line number Diff line change 1010package org .elasticsearch .index .mapper ;
1111
1212import org .elasticsearch .action .index .ModernSource ;
13- import org .elasticsearch .common .bytes .BytesArray ;
1413import org .elasticsearch .common .bytes .BytesReference ;
1514import org .elasticsearch .core .Nullable ;
1615import org .elasticsearch .plugins .internal .XContentMeteringParserDecorator ;
2221public class SourceToParse {
2322
2423 private final ModernSource modernSource ;
25- private final BytesReference source ;
2624
2725 private final String id ;
2826
@@ -67,10 +65,6 @@ public SourceToParse(
6765 ) {
6866 this .id = id ;
6967 this .modernSource = source ;
70- // we always convert back to byte array, since we store it and Field only supports bytes..
71- // so, we might as well do it here, and improve the performance of working with direct byte arrays
72- BytesReference sourceBytes = source .originalSourceBytes ();
73- this .source = sourceBytes .hasArray () ? sourceBytes : new BytesArray (sourceBytes .toBytesRef ());
7468 this .xContentType = Objects .requireNonNull (xContentType );
7569 this .routing = routing ;
7670 this .dynamicTemplates = Objects .requireNonNull (dynamicTemplates );
You can’t perform that action at this time.
0 commit comments