We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b31c2e0 commit 603af45Copy full SHA for 603af45
libs/core/src/main/java/org/elasticsearch/core/BaseText.java
@@ -12,6 +12,7 @@
12
import org.elasticsearch.core.bytes.BaseBytesArray;
13
import org.elasticsearch.core.bytes.BaseBytesReference;
14
15
+import java.nio.ByteBuffer;
16
import java.nio.charset.StandardCharsets;
17
18
/**
@@ -65,7 +66,7 @@ public boolean hasString() {
65
66
*/
67
public String string() {
68
if (text == null) {
- throw new UnsupportedOperationException("TODO");
69
+ text = StandardCharsets.UTF_8.decode(ByteBuffer.wrap(bytes.array(), bytes.arrayOffset(), bytes.length())).toString();
70
}
71
return text;
72
0 commit comments