RFR: 8324048: (fc) Make FileKey fields final
Brian Burkhalter
bpb at openjdk.org
Wed Aug 21 19:21:04 UTC 2024
On Wed, 21 Aug 2024 18:36:04 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:
>>> I assume a System.loadLibrary (by way of IOUtil.load) is needed, otherwise dependent on something else loading the native library.
>>
>> I think that is correct after all. It should load the NIO native library, which defines `fdval()` and `handleval()`. I must have confounded this with #20317 wherein those symbols are moved to `libjava`.
>
> I think the important part here is that libnio defines `Java_sun_nio_ch_FileKey_init`.
Something must be loading the library but I don't know what. I did some testing which does not use any NIO classes other than `FileKey`, and the class worked without the explicit load, on both Unix and Windows. I think, however, that I need to add it on Unix and restore it on Windows to be safe.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20429#discussion_r1725641628
More information about the nio-dev
mailing list