RFR: 8322809: SystemModulesMap::classNames and moduleNames arrays do not match the order [v2]

Mandy Chung mchung at openjdk.org
Tue Jan 9 18:05:15 UTC 2024


> One optimization of Jlink SystemModulesPlugin pre-resolves the module graph for modules with a main class.  It stores the name of the initial module and the generated `SystemModules` class name in two arrays that can be obtained from `SystemModulesMap::moduleNames` and `SystemModulesMap::classNames`.   The elements in the array returned by `classNames()` are supposed to correspond to the elements in the array returned by `moduleNames()`.    However, the implementation sorts both arrays by the value of the elements. 
> 
> This fix is simple and write the correct class names and not to sort the values separately.

Mandy Chung has updated the pull request incrementally with one additional commit since the last revision:

  Update the test verification to check the expected modules with main class

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/17316/files
  - new: https://git.openjdk.org/jdk/pull/17316/files/0e5350a5..d0e55ddb

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=17316&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=17316&range=00-01

  Stats: 33 lines in 4 files changed: 25 ins; 0 del; 8 mod
  Patch: https://git.openjdk.org/jdk/pull/17316.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/17316/head:pull/17316

PR: https://git.openjdk.org/jdk/pull/17316


More information about the core-libs-dev mailing list