Harmony
  1. Harmony
  2. HARMONY-539

ArrayList.addAll(0, ...) index out of bounds exception

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Classlib
    • Labels:
      None
    • Estimated Complexity:
      Novice

      Description

      The following code works on RI but causes an array index out of bounds exception on Harmony.

      ArrayList alist = new ArrayList();
      ArrayList blist = new ArrayList();
      alist.add("a");
      alist.add("b");
      blist.add("c");
      blist.add("d");
      blist.remove(0);
      blist.addAll(0, alist);

      java.lang.ArrayIndexOutOfBoundsException: Array index out of range: -1

      1. ArrayListTest.java
        0.7 kB
        Nathan Beyer
      2. jira_539_patch.txt
        0.6 kB
        Nathan Beyer

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Nathan Beyer
            Reporter:
            Mark Hindess
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development