RFR: 8302789: (fs) File.copy should include unsupported copy option in exception message

Alan Bateman alanb at openjdk.org
Sat Feb 18 07:11:24 UTC 2023


On Fri, 17 Feb 2023 20:42:49 GMT, Christian Stein <cstein 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"?

-------------

PR: https://git.openjdk.org/jdk/pull/12625


More information about the nio-dev mailing list