On Tue, 1 Aug 2023 09:31:15 GMT, Marius Hanl <mh...@openjdk.org> wrote:

>> modules/javafx.graphics/src/main/java/com/sun/glass/utils/NativeLibLoader.java
>>  line 312:
>> 
>>> 310:                 try {
>>> 311:                     if (!Files.exists(path)) {
>>> 312:                         Files.copy(is, path);
>> 
>> I noticed `is` is not closed (also in the original code).
>> Would that be a problem?
>
> Probably something to evaluate, but in a separate ticket

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.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1188#discussion_r1280488134

Reply via email to