RFR JDK-8217527: jmod hash does not work if --hash-module does not include the target module

Mandy Chung mandy.chung at oracle.com
Fri Jul 17 18:45:27 UTC 2020


Webrev:
http://cr.openjdk.java.net/~mchung/jdk16/webrevs/8217527/webrev.00/

The current implementation jmod hash ignores the target jmod file if 
specified.

Therefore even B requires A:

$ jmod hash --hash-module B --module-path jmods jmods/A.jmod

This jmod hash command finds no module to record hashes.

The patch fixes jmod hash such that if the target jmod file is 
specified, it is the module to record the hashes and it must have no 
outgoing read edges to the modules on the application path. If the 
target jmod file is not specified, jmod hash will find from the resolved 
modules that have no outgoing edges and match the given pattern to 
record hashes of the modules requiring it directly or indirectly.

jmod hash command should also report no hash recorded if no module found 
to record hashes.

Thanks
Mandy


More information about the jigsaw-dev mailing list