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

List method add(String n,int i) does not throw ArrayOutOfBoundsException.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Duplicate
    • Affects Version/s: 1.2.2
    • Fix Version/s: None
    • Component/s: client-libs
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description


      Using JDK 1.2.2 build Q.
      The specification says that the method add(String item, int index) of the AWT class
      List is supposed to throw an ArrayIndexOutOfBounds exception when index is less
      than -1. The JCK-12a test api/java_awt/interactive/descriptions.html#ListTest
      fails. The mode of failure indicates that the exception is not being thrown.

      I cannot explain how to setup and run the test. JavaTest setup is simply too
      complicated. Consult with a JCK engineer or a JavaSoft engineer that has dealt
      with these issues before.


      Add a name "neg" at index -2. The entry is added to the end of the list.
      Status message says "Item neg has been added at index -2." Looking
      at the source code proves that the ArrayIndexOutOfBounds exception
      that the 1.2 API spec calls for is not being thrown.
      Click on show status
      The test says "An element 6: neg has been added to the end of the list."

      allan.jacobs@Eng 1999-05-04

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ehawkessunw Eric Hawkes (Inactive)
              Reporter:
              ajacobssunw Allan Jacobs (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: