RFR: 8204256: improve jlink error message to report unsupported class file format

Alan Bateman alanb at openjdk.java.net
Thu Oct 1 06:55:36 UTC 2020


On Wed, 30 Sep 2020 22:21:59 GMT, Mandy Chung <mchung at openjdk.org> wrote:

>> @mlchung's second suggestion would be the easiest route to take. I wanted to avoid fishing into exception messages or
>> anything along those lines. The initial work to this fix was to explore how tricky attaining that kind of parity is.
>> Alternatively we could change the existing exception message path and modify it so it's in line with the simpler
>> solution as well? That makes sense to me, anyway.
>
>> Alternatively we could change the existing exception message path and modify it so it's in line with the simpler
>> solution as well? That makes sense to me, anyway.
> 
> Sounds reasonable to me.

Add a cause may work but it should probably be predicted on isLinkPhase as otherwise it will leak through to usages of
the ModuleFinder API.

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

PR: https://git.openjdk.java.net/jdk/pull/409


More information about the core-libs-dev mailing list