On Wed, 3 Mar 2021 02:08:15 GMT, Yasumasa Suenaga <ysuen...@openjdk.org> wrote:

> I think we should remove `main()` from CLHSDB/HSDB to be honest because they 
> are called from SALauncher, and we cannot call them directly because they are 
> not exported in module-info.

Yes, I'm starting to come to the same conclusion. The only code that constructs 
a `CLHSDB` object, and therefore triggers the potential call to `doUsage()`, is 
`CLHSDB.main()`, and it is only called from `SALauncher` when using `jhsdb 
clhsdb`. We could get rid of `main()` and have some other entrypoint that is 
passed the values of all the possible options, rather than having to parse them 
in CLHSDB.java.

There is one test invokes java with the `CLHSDB` class. See SABase.java. It's 
part of ciReplay testing. I think it would be easily modified to just run 
`jhsdb clhsdb`

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

PR: https://git.openjdk.java.net/jdk/pull/2773

Reply via email to