RFR: 8372301: Improve error message for jimage command line tool regarding version mismatch [v2]

Alan Bateman alanb at openjdk.org
Tue Feb 17 13:40:57 UTC 2026


On Tue, 17 Feb 2026 12:47:04 GMT, David Beaumont <duke at openjdk.org> wrote:

>> David Beaumont has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Back to original idea of special case exception
>
> 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.

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

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


More information about the core-libs-dev mailing list