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

(fs spec) Files.write and newBufferedWriter methods missing @throws IAE

    XMLWordPrintable

    Details

    • Subcomponent:
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      Spec clarification only to match original/current behavior.
    • Interface Kind:
      Java API
    • Scope:
      SE

      Description

      Summary

      Files.write and newBufferedWriter methods missing @throws IAE

      Problem

      All methods in java.nio.file.Files that allow file open options to be specified should declare that IllegalArgumentException be thrown when invalid options or combinations of options are specified.

      The newBufferedWriter and write methods are missing the @throws, this needs to be added to allow JCK add further conformance tests in this area.

      Solution

      Add the missing @throws IllegalArgumentException to the newBufferedWriter and write methods

      Specification

      Add the following to the 5 methods:
      
      @throws IllegalArgumentExcepiton if the set contains an invalid combination of options
      
      Note that this is the established wording for this exception in this API. It deliberately does not get into specifics because open options are extensible in this API.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              alanb Alan Bateman
              Reporter:
              alanb Alan Bateman
              Reviewed By:
              Joe Darcy
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: