ArrayList.removeAll(null) throws NPE

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P3
    • None
    • Affects Version/s: 8
    • Component/s: core-libs

      FULL PRODUCT VERSION :
      java8b92

      A DESCRIPTION OF THE PROBLEM :
      ArrayList.removeAll(null); previously didn't do anything on empty lists. With Java 8 it throws an exception. Although this adheres to the contract in the JavaDoc it breaks existing code.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      new ArrayList<String>().removeAll(null);

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      no NPE

      REPRODUCIBILITY :
      This bug can be reproduced always.

            Assignee:
            Unassigned
            Reporter:
            Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: