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

FileReader(String) documentation is insufficient

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P5 P5
    • 19
    • 8u20
    • core-libs
    • b14
    • generic
    • generic

      A DESCRIPTION OF THE REQUEST :
      The FileReader(String) constructor documentation contains no information about how the String argument is interpreted if it is not a simple name.

      JUSTIFICATION :
      See this question on StackOverflow I answered:

      http://stackoverflow.com/questions/25931856/file-not-found-exception-in-executing-javascript-in-nashorn

      When writing the answer, I discovered that there was no way the person could have known from the documentation alone; it's a sort of unstated assumption how the String argument to FileReader is interpreted. Should be cleaned up.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      A pointer to the java.io.File documentation would probably be sufficient.
      ACTUAL -
      "Creates a new FileReader, given the name of the file to read from."

      ---------- BEGIN SOURCE ----------
      Not applicable.
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Know a lot about Java; don't be a beginner. :)

            bpb Brian Burkhalter
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: