[jdk11u-dev] RFR: 8217527: jmod hash does not work if --hash-module does not include the target module [v2]

Paul Hohensee phh at openjdk.org
Wed Jun 4 19:57:59 UTC 2025


On Sat, 31 May 2025 16:41:21 GMT, Daniel Hu <duke at openjdk.org> wrote:

>> I'd like to backport this fix because currently `jmod hash` command does not work on already created modules and this fixes that issue. This isn't intended behavior; nothing in Oracle documentation states this limitation, and moreover the command itself gives opaque response: there's no error message or non-zero exit, instead the command does nothing and no modules are changed after hashing.
>> 
>> The backport isn't clean because of conflicts in `HashesTest.java`. The conflicts are due to later commits being backported first; as all main `HashesTest.java` patches on jdk17 are now backport to 11, resolution meant simply copying 17's implementation over (some differences remain like `upgradeableModule` method is in different location but otherwise its function is exactly the same). This change was ran on internal Amazon pipelines and passes jtreg tier1-4 + tck tests on the following platforms: linux x64, aarch64, x86, aarch32; macos x64, aarch64; windows x64, x86.
>
> Daniel Hu has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Add missing testHashModulesPattern

testHashModulesPattern() was static as in the original patch, but tip has it virtual, so np afaic.

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

Marked as reviewed by phh (Reviewer).

PR Review: https://git.openjdk.org/jdk11u-dev/pull/3039#pullrequestreview-2897938264


More information about the jdk-updates-dev mailing list