On Tue, 26 Aug 2025 05:46:13 GMT, Jayathirth D V <[email protected]> wrote:
>> We need to throw appropriate exception when we pass invalid image index
>> values to ImageReader.getImageTypes().
>> We throw IOOBE in all other plugins except JPEG, Added appropriate check to
>> throw IOOBE when JpegImageReader has invalid image index.
>
> 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?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26522#discussion_r2299852344