On 10/23/17 9:05 PM, Sundararajan Athijegannathan wrote:
Hi,

* ALL-MODULE-PATH case seems to be handled fine (in  private JlinkConfiguration initJlinkConfig() throws BadArgs { method). When no --module-path is specified, default module path is used and all default observable modules are added as root. I ran the command you mentioned and it worked fine.


That's right.  The default module path is added before initJlinkConfig is called.  Thanks for confirming that.

* refactored JlinkConfiguration.moduleFinder as a static method. Note that we've to create ModuleFinder inside JlinkContiguration because we may change modulepaths in constructor (if java.base module is not found) and so new ModuleFinder has to be created anyway.

There are three places creating a ModuleFinder, JlinkConfiguration::moduleFinder, JlinkTask::initJlinkConfig, and JlinkTask::newModuleFinder.   It'd be good to  refactor this e.g. all call the newModuleFinder method.

Add a new JlinkConfiguration constructor takes a ModuleFinder and have the initJlinkConfig method to create a ModuleFinder with the default module path appended, if appropriate.  line 254-265 in JlinkTask - the check of an empty module path is not needed. Instead it can test if java.base is found from JlinkConfiguration::finder.

Mandy

Reply via email to