RFR: 8307536: FileAlreadyExistsException from NativeLibLoader when running concurrent applications with empty cache
Andy Goryachev
angorya at openjdk.org
Tue Aug 15 17:31:12 UTC 2023
On Thu, 3 Aug 2023 11:48:39 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>> I agree, this should probably be considered as well, as part of a separate ticket.
>>
>> Note that, when the file already exists in the cache, the initial InputStream object is used by the DigestInputStream, and it is manually closed and reread again, so special care should be taken here.
>
> Unless we suspect a problem, I don't see a need to do anything differently.
A possible problem is we might reach the maximum of open file handles in the underlying OS (I've experienced this before). I think we should definitely fix it (in a separate ticket).
Curiously, the code example for Files.copy(InputStream in, Path target, CopyOption... options) does not include closing of input stream, though it has some verbiage about promptly closing the input stream in case of an error. I think javadoc there might need to be improved.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1188#discussion_r1294903685
More information about the openjfx-dev
mailing list