Uploaded image for project: 'CCC Migration Project'
  1. CCC Migration Project
  2. CCC-8062632

(fs spec) Package description could be clearer on the cases where NPE is thrown

    XMLWordPrintable

Details

    • behavioral
    • minimal
    • Spec clarification only.
    • Java API
    • SE

    Description

      Summary

      java.nio.file package description could be clearer on the cases where NPE is thrown

      Problem

      The package description for java.nio.file has a paragraph to specify that NullPointerException is thrown when constructors or methods are invoked with null. This paragraph doesn't clearly cover the case where methods take an array (varargs in this API) and the array contains a null element.

      Solution

      Update the package description to make it clear that NPE is also thrown when methods are invoked with an array containing a null element.

      Specification

      Change this statement in the package description from:

      Additionally, invoking a method with a collection containing a {@code null} element will cause a {@code NullPointerException}, unless otherwise specified.

      to:

      Additionally, invoking a method with an array or collection containing a {@code null} element will cause a {@code NullPointerException}, unless otherwise specified.

      Attachments

        Issue Links

          Activity

            People

              alanb Alan Bateman
              alanb Alan Bateman
              Joe Darcy
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: