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

Collections.checkedList(empty list).replaceAll((UnaryOperator)null) doesn't throw NPE after JDK-8047795

    XMLWordPrintable

Details

    • b23
    • b26
    • Verified

    Backports

      Description

        The JavaSE 8 specification for j.u.List
        http://docs.oracle.com/javase/8/docs/api/java/util/List.html#replaceAll-java.util.function.UnaryOperator-
        contains the following assertion:
        "NullPointerException - if the specified operator is null"

        This assertion has been satisfied by the following code sample:

                Collections.checkedList(Arrays.asList(), Object.class).replaceAll((UnaryOperator)null);

        before the fix for JDK-8047795 but is not satisfied after the fix.

        The following JCK8 testcase fails due to this:

        api/java_util/Collections/checked/CheckedListReplaceAll.html#CheckedListReplaceAll[npe]



        Attachments

          Issue Links

            Activity

              People

                chegar Chris Hegarty
                dbessono Dmitry Bessonov
                Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: