RFR: 8302789: (fs) File.copy should include unsupported copy option in exception message
Christian Stein
cstein at openjdk.org
Tue Feb 21 10:48:27 UTC 2023
On Sat, 18 Feb 2023 07:09:03 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> This PR also fixes the exception message for unsupported move options.
>
> src/java.base/windows/classes/sun/nio/fs/WindowsFileCopy.java line 304:
>
>> 302: }
>> 303: if (option == null) throw new NullPointerException();
>> 304: throw new UnsupportedOperationException("Unsupported move option: " + option);
>
> The parameter is a CopyOption so changing the message to "move option" might be confusion, maybe just change it to "option"?
Plain "option" might be best here.
-------------
PR: https://git.openjdk.org/jdk/pull/12625
More information about the nio-dev
mailing list