On Mon, 31 Jul 2023 09:51:59 GMT, Alexey Ivanov <[email protected]> wrote:

>> Prasanta Sadhukhan has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Use try-with-resource
>
> src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java line 
> 2613:
> 
>> 2611: 
>> 2612:                     handleReaderImport(r, c, useRead);
>> 2613:                     r.close();
> 
> Should we use try-with-resources for Reader? This will ensure the stream is 
> closed even if `handleReaderImport` throws an exception.

Seems like good idea..Modified...

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15033#discussion_r1280194991

Reply via email to