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

    • minimal
    • Spec clarification only to match original/current behavior.
    • Java API
    • SE

      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.

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

              Created:
              Updated:
              Resolved: