On Fri, 25 Nov 2022 06:46:52 GMT, ExE Boss <d...@openjdk.org> wrote: > I believe `UnsupportedOperationException` would be better for this.
It would but Per is right that this it is throwing ISE today, it's just that the PR adds an explicit check and that highlights that the wrong exception is thrown. Buffers that are views over memory that is thread confined can't be used with the AsynchronousXXXX APIs and this will needed to be specified. There is further work required in this area too because IOUtil was intended for synchronous I/O. The "async" support was added on a temporary basis and will need to be re-visited at some point. ------------- PR: https://git.openjdk.org/jdk/pull/11260