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

FileReader(String) documentation is insufficient

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P5 P5
    • 19
    • core-libs
    • None
    • behavioral
    • minimal
    • Added verbiage describes longstanding behavior.
    • Java API
    • SE

      Summary

      Add a sentence to the java.io package javadoc clarifying how a String representing a pathname string is interpreted in the package.

      Problem

      In java.io constructors and methods it is not explicitly stated how a String representing a pathname string is handled.

      Solution

      Add a blanket statement to the java.io package level javadoc indicating the a pathname string represented by a String is interpreted as described in the java.io.File class level specification.

      Specification

      --- a/src/java.base/share/classes/java/io/package-info.java
      +++ b/src/java.base/share/classes/java/io/package-info.java
      @@ -27,10 +27,14 @@
        * Provides for system input and output through data streams,
        * serialization and the file system.
        *
      - * Unless otherwise noted, passing a null argument to a constructor or
      + * Unless otherwise noted, passing a {@code null} argument to a constructor or
        * method in any class or interface in this package will cause a
        * {@code NullPointerException} to be thrown.
        *
      + * A <i>pathname string</i> passed as a {@code String} argument to a
      + * constructor or method in any class or interface in this package will be
      + * interpreted as described in the class specification of {@link File}.
      + *

            bpb Brian Burkhalter
            webbuggrp Webbug Group
            Lance Andersen, Naoto Sato
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: