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

(coll spec) List.get, set have incorrect bounds (off-by-one) in exception specification

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P3 P3
    • 6
    • 6
    • core-libs

      The exception specification for IndexOutOfBoundsException for List.get should
      *not* allow an index >= size(), while the spec for List.add() should not allow
      index > size(), but in fact the bounds in the javadoc are identical.
      In both cases, the implementation is correct. The spec should be changed
      to agree with the code.
      ###@###.### 2005-05-15 23:57:09 GMT

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: