Skip to content

Commit 2d28a6d

Browse files
committed
Changes
1 parent befffa9 commit 2d28a6d

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

server/src/main/java/org/elasticsearch/index/mapper/SourceToParse.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
package org.elasticsearch.index.mapper;
1111

1212
import org.elasticsearch.action.index.ModernSource;
13-
import org.elasticsearch.common.bytes.BytesArray;
1413
import org.elasticsearch.common.bytes.BytesReference;
1514
import org.elasticsearch.core.Nullable;
1615
import org.elasticsearch.plugins.internal.XContentMeteringParserDecorator;
@@ -22,7 +21,6 @@
2221
public 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);

0 commit comments

Comments
 (0)