RFR: 8324048: (fc) Make FileKey fields final

Daniel Jeliński djelinski at openjdk.org
Wed Aug 21 13:32:06 UTC 2024


On Thu, 1 Aug 2024 18:09:30 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> Replace use of IDs to set FileKey fields from native with passing down an array, at the expense of an array allocation.

src/java.base/unix/native/libnio/ch/FileKey.c line 39:

> 37:     struct stat fbuf;
> 38:     int res;
> 39:     long deviceAndInode[2];

Suggestion:

    jlong deviceAndInode[2];

src/java.base/windows/classes/sun/nio/ch/FileKey.java line 67:

> 65: 
> 66:     static {
> 67:         IOUtil.load();

I assume you verified that `IOUtil.load()` won't be needed, correct?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20429#discussion_r1725042382
PR Review Comment: https://git.openjdk.org/jdk/pull/20429#discussion_r1725057005


More information about the nio-dev mailing list