Character.codePoint{At|Before}(char[], int, int) doesn't do JavaDoc-specified check

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 20
    • Affects Version/s: None
    • Component/s: core-libs
    • None
    • b27

      I found out that this code
      public class Main {
          public static void main(String[] args) {
              String s = "Hello world!";
              char[] chars = s.toCharArray();
              int point = Character.codePointAt(chars, -1, 1);
          }
      }
      throws ArrayIndexOutOfBoundsException instead of JavaDoc-specified IndexOutOfBoundsException and the method doesn't check whether index parameter is negative.

            Assignee:
            Sergey Tsypanov
            Reporter:
            Sergey Tsypanov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: