RFR: 8364135: JPEGImageReader.getImageTypes() should throw exception for negative image index [v4]

Jayathirth D V jdv at openjdk.org
Tue Aug 26 06:03:02 UTC 2025


On Tue, 26 Aug 2025 05:49:59 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>> Jayathirth D V has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Make test more robust
>>  - Use thread lock
>
> src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java line 848:
> 
>> 846:     public int getWidth(int imageIndex) throws IOException {
>> 847:         setThreadLock();
>> 848:         verifyImageIndex(imageIndex);
> 
> Dont we need to put in inside try-finally block for it to call `clearThreadLock` as it is throwing an exception?

Yes, updated.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26522#discussion_r2299864415


More information about the client-libs-dev mailing list