Skip to content

Apache Lucene open-source search software

javadoc: clarify exception that can be thrown from ut8 conversion

Yonik Seeley1c6a43c64708
diff --git a/solr/src/java/org/apache/solr/util/ByteUtils.java b/solr/src/java/org/apache/solr/util/ByteUtils.java
index e0966e786b2..f6fdf7b6291 100755
--- a/solr/src/java/org/apache/solr/util/ByteUtils.java
+++ b/solr/src/java/org/apache/solr/util/ByteUtils.java
@@ -26,8 +26,9 @@ public class ByteUtils {
/** Converts utf8 to utf16 and returns the number of 16 bit Java chars written.
* Full characters are read, even if this reads past the length passed (and can result in
- * an exception if invalid UTF8 is passed).
- * The char[] out should probably have enough room to hold the worst case of each byte becoming a Java char. */
+ * an ArrayOutOfBoundsException if invalid UTF8 is passed). Explicit checks for valid UTF8 are not performed.
+ * The char[] out should probably have enough room to hold the worst case of each byte becoming a Java char.
+ */
public static int UTF8toUTF16(byte[] utf8, int offset, int len, char[] out, int out_offset) {
int out_start = out_offset;