On Tue, 17 Feb 2026 13:38:06 GMT, Alan Bateman <[email protected]> wrote:

>> src/jdk.jlink/share/classes/jdk/tools/jimage/JImageTask.java line 438:
>> 
>>> 436:                 }
>>> 437:             } catch (IOException ioe) {
>>> 438:                 boolean isVersionMismatch = ioe instanceof 
>>> BasicImageReader.ImageVersionMismatchException;
>> 
>> Or I can have a separate catch block. Either is fine by me.
>
> A catch of ImageVersionMismatchException would be a bit nicer, not important 
> of course.

My feeling is that, in this case, it's cleaner to just catch the IOE once, 
because it keeps the message handling in one place.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29723#discussion_r2817955450

Reply via email to