RFR: 8378110: Add -XX: prefix to settings-file flags in RuntimeMXBean.getInputArguments() [v2]

Oli Gillespie ogillespie at openjdk.org
Fri Feb 27 15:11:06 UTC 2026


On Fri, 27 Feb 2026 14:54:22 GMT, Kevin Walls <kevinw at openjdk.org> wrote:

>> Fine by me. I could also just remove it, like I said it never triggers anyway, and it seems a bit strange to explicitly handle it. If it does happen, we'll get an implicit null check later on when we try to iterate `rm.getInputArguments()`, which is arguably better.
>
> Either is usable.  The else might be best as it could even throw a SkippedException or just throw a failure as a misconfigred/specified test.
> As you mention we probably can't reliably test for empty getInputArguments(), unless we specifically start a new process, but think we don't need to go that far right now.

Actually I prefer removal over throwing an exception - the first test case explicitly passes no arguments, it's the incidental nature of the test harness that arguments do make their way to us. So if the test suite suddenly stopped interfering, that doesn't seem wrong exactly and I'd prefer the test to continue on its merry way (and ideally fail if getInputArguments returns null, which it will in this case although mostly incidentally).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29793#discussion_r2864775803


More information about the serviceability-dev mailing list