RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v13]

Alan Bateman alanb at openjdk.org
Fri Nov 25 07:17:08 UTC 2022


On Fri, 25 Nov 2022 06:46:52 GMT, ExE Boss <duke at 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


More information about the security-dev mailing list