Integrated: JDK-8264111 (fs) Leaking NativeBuffers in case of errors during UnixUserDefinedFileAttributeView.read/write
Sebastian Stenzel
github.com+1204330+overheadhunter at openjdk.java.net
Fri Mar 26 15:01:27 UTC 2021
On Wed, 24 Mar 2021 10:37:56 GMT, Sebastian Stenzel <github.com+1204330+overheadhunter at openjdk.org> wrote:
> Added new private methods for `read(String name, long address, int rem)` and `write(String name, long address, int rem)` that take an address as an argument and thereby no longer need to deal with any NativeBuffers.
>
> This allows a certain simplification of `read(String name, ByteBuffer dst)` and `write(String name, ByteBuffer src)` and use of `try (NativeBuffer nb = NativeBuffers.getNativeBuffer(rem)) {...}` which fixes the issue.
This pull request has now been integrated.
Changeset: 4e74de4b
Author: Sebastian Stenzel <sebastian.stenzel at skymatic.de>
Committer: Alan Bateman <alanb at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/4e74de4b
Stats: 89 lines in 1 file changed: 27 ins; 20 del; 42 mod
8264111: (fs) Leaking NativeBuffers in case of errors during UnixUserDefinedFileAttributeView.read/write
Reviewed-by: alanb
-------------
PR: https://git.openjdk.java.net/jdk/pull/3171
More information about the nio-dev
mailing list