8255671: Bidi.reorderVisually has misleading exception messages

Reviewed-by: joehw
This commit is contained in:
Naoto Sato 2020-11-02 16:48:16 +00:00
parent 2f7d34f205
commit 6dac8d2780
2 changed files with 35 additions and 3 deletions

View file

@ -4590,13 +4590,13 @@ public class BidiBase {
}
if (0 > objectStart || objects.length <= objectStart) {
throw new IllegalArgumentException("Value objectStart " +
levelStart + " is out of range 0 to " +
objectStart + " is out of range 0 to " +
(objects.length-1));
}
if (0 > count || objects.length < (objectStart+count)) {
throw new IllegalArgumentException("Value count " +
levelStart + " is out of range 0 to " +
(objects.length - objectStart));
count + " is less than zero, or objectStart + count" +
" is beyond objects length " + objects.length);
}
byte[] reorderLevels = new byte[count];