From 1c6a43c647084109b43e2c8f42dad2d92461db78 Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Thu, 27 May 2010 11:28:49 +0000 Subject: [PATCH] javadoc: clarify exception that can be thrown from ut8 conversion git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@948788 13f79535-47bb-0310-9956-ffa450edef68 --- solr/src/java/org/apache/solr/util/ByteUtils.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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;