On Thu, 4 Jul 2024 05:20:38 GMT, David Holmes <dhol...@openjdk.org> wrote:

> Can a line ever be empty?

No it can't.  Runing "jcmd PID" becomes "help", and giving empty quotes as the 
command like
  jcmd PID "" 
does pass an empty string to parse_and_execute(), but the DCmdIter in there 
will never find anything to iterate (nor with multiple "" or with "     ").

bash-4.2$ jcmd 18851 "" 
18851:
Command executed successfully

The CmdLine is the thing that would be returned by DCmdIter, and we don't 
create empty ones (as things stand today).  So this change should be harmless 
but correct.

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

PR Comment: https://git.openjdk.org/jdk/pull/20006#issuecomment-2208465886

Reply via email to