On Wed, 3 Jul 2024 13:58:51 GMT, Kevin Walls <kev...@openjdk.org> wrote:
> CmdLine::is_executable() looks wrong, surely an empty line is not executable. > > With this change, in DCmd::parse_and_execute() we will avoid needlessly > entering the code block to try and execute the command. > > DCmd tests all good: > make images test TEST="test/hotspot/jtreg/serviceability/dcmd > test/jdk/sun/tools/jcmd" My concern is that the logic was wrong and so you fixed it, but this then screams out for a test that would have detected the error, but you can't write a test because the line can never be empty, so that becomes an invariant rather than a runtime check. ------------- PR Comment: https://git.openjdk.org/jdk/pull/20006#issuecomment-2209631591