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

(fs) Files.copy should include unsupported copy option in exception message

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • None
    • core-libs
    • b11
    • generic

      In line 84 and also line 304 of WindowsFileCopy.java in java.base/windows/classes/sun/nio/fs/ the details message lacks the string representation of the actual option instance that is not supported.

      Proposal: replace
          throw new UnsupportedOperationException("Unsupported copy option");
      with
          throw new UnsupportedOperationException("Unsupported copy option: " + option);

            cstein Christian Stein
            cstein Christian Stein
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: