On 3.4.2014 14:08, Dmitry Samersoff wrote:
Jaroslav,

Command line processing is still not clean, e.g. you check for -help in
three different places.

If you go to refactor this code rather than provide a minimal fix,
it might be better to create a separate inner class that do all command
line processing and provide couple of flags like should_sa(),
should_help(), should_attach() etc.

Yes, I know :(

My first approach was exactly like that. But I was rewriting the command line parser from scratch for at least the 3rd time for "tools" alone :( And the change was going to be rather big - more of a complete rewrite than a fix.

May be this is a time to replace all various incarnations of command line processing with a unified command line parsing API? But this would obviously go beyond the simple fix of one missed argument combination.

-JB-



-Dmitry



On 2014-04-03 15:27, Jaroslav Bachorik wrote:
Please, review the following fix in "jinfo" launcher.

Issue : https://bugs.openjdk.java.net/browse/JDK-8039080
Webrev: http://cr.openjdk.java.net/~jbachorik/8039080/webrev.00

When switching "jinfo" to utilize diagnostic commands when possible a
combination of launcher arguments was omitted causing "jinfo" fail to
execute the default action (-flags & -sysproperties) against a remote SA
debug server.

The patch fixes this omission. Additionally it contains a refactoring to
make the launcher argument parsing testable via a unit test (testng).
Also, a new test is provided covering the possible argument combinations.

Thanks,

-JB-



Reply via email to