The changes to the module system to allow the JDK exploded image support preview features needs a new cleanups. All relatively simple:
- the factory method to create ModuleFinder that locates modules in a JDK exploded image is renamed as this is not like the module path specified to the java launcher or jlink tool. - the ModuleReader for the exploded image is shouldn't be checking that a resource exists twice. - the ModuleReader::list method does not need to collect all resources when preview features are disabled or the module does not have any preview classes - Some cleanups to the test. assertUtf8Resource is renamed to testReader as it's really testing all the module reader methods. Fixed some resource leaks and reverted a few random format/comment changes that are nothing to do with the changes in the branch. --------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - Merge branch 'lworld' into ExplodedModulesCleanup - Add comment to explain skip - Initial commit Changes: https://git.openjdk.org/valhalla/pull/2540/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=2540&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8386623 Stats: 160 lines in 4 files changed: 68 ins; 30 del; 62 mod Patch: https://git.openjdk.org/valhalla/pull/2540.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/2540/head:pull/2540 PR: https://git.openjdk.org/valhalla/pull/2540
