Index: Character.java =================================================================== --- Character.java (revision 427581) +++ Character.java (working copy) @@ -1914,10 +1914,11 @@ * @since 1.5 */ public static int codePointAt(char[] seq, int index, int limit) { + if (index < 0 || index >= limit || limit < 0) + throw new IndexOutOfBoundsException(); if (seq == null) throw new NullPointerException(); - int len = seq.length; - if (index < 0 || index >= limit || limit < 0 || limit > len) + if (limit > seq.length) throw new IndexOutOfBoundsException(); char high = seq[index++];