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

Ian Graves igraves at openjdk.java.net
Tue Sep 29 19:40:56 UTC 2020


This pull request contains a change to facilitate better error messages in jlink for when jlink creates an image from
jmod files that are unsupported by the runtime by being _too new_. The existing behavior supports modules that are too
old via an error about a mismatched version.

The solution to this problem is constrained by jlink's use of some specified behavior by java.lang.module.ModuleFinder.
The solution in this PR is to subclass some existing exceptions internally as to signal to jlink more specific error
conditions when attempting to find and open modules.

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

Commit messages:
 - Handling error messages for unsupported module descriptor versions

Changes: https://git.openjdk.java.net/jdk/pull/409/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=409&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8204256
  Stats: 141 lines in 6 files changed: 120 ins; 1 del; 20 mod
  Patch: https://git.openjdk.java.net/jdk/pull/409.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/409/head:pull/409

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


More information about the core-libs-dev mailing list