Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6270659

(coll) Which exception should List.subList(x,y) throw when x>y?

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • 6
    • 6
    • core-libs
    • None

      List.subList specifies that List.subList(x,y), where x>y,
      throws IndexOutOfBoundsException.
      Unfortunately, its skeletal implementation, AbstractList, specifies that
      IllegalArgumentException is thrown.

      Different implementations behave differently, violating the contract of
      List.subList.
      ###@###.### 2005-05-16 02:21:25 GMT

            martin Martin Buchholz
            martin Martin Buchholz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: