RFR: Cleanup ProcessTool.createJavaProcessBuilder()
Alex Menkov
amenkov at openjdk.java.net
Fri Apr 15 20:53:15 UTC 2022
On Fri, 15 Apr 2022 20:38:47 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:
> Two issues (discovered by Alex):
>
> 1. A number of the "if" blocks are already covered by the `doubleWordArgs` loop.
> 2. The `doubleWordArgs` loop should exit with a `break` instead of a `continue`
Chris, one more minor thing while you are here:
Lines 307-312:
`
boolean noModule = true;
for (String cmd: command) {
if (cmd.equals("-m")) {
noModule = false;
}
}
`
please add "break" if the argument found.
Or this can be simplified to
`boolean noModule = !Arrays.asList(args).contains("-m");`
-------------
PR: https://git.openjdk.java.net/loom/pull/152
More information about the loom-dev
mailing list