Skip to content

Commit

Permalink
Update util method
Browse files Browse the repository at this point in the history
Signed-off-by: Rishab Nahata <[email protected]>
  • Loading branch information
imRishN committed Jun 9, 2023
1 parent 242c3ce commit 22cb692
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void writeTo(OutputStream os) throws IOException {
public String utf8ToString() {
BytesRef bytesRef = toBytesRef();
final char[] ref = new char[bytesRef.length];
final int len = UnicodeUtil.UTF8toUTF16(bytesRef.bytes, bytesRef.offset, bytesRef.length, ref);
final int len = UnicodeUtil.UTF8toUTF16(bytesRef, ref);
if (len > MAX_LENGTH) {
throw new IllegalStateException("UTF16 String size is " + len + ", should be less than " + MAX_LENGTH);
}
Expand Down

0 comments on commit 22cb692

Please sign in to comment.