On Wed, 3 Jul 2024 14:31:51 GMT, Sonia Zaldana Calles <szald...@openjdk.org> 
wrote:

>> Hi all, 
>> 
>> This PR addresses [8332124](https://bugs.openjdk.org/browse/JDK-8332124) 
>> enabling jcmd to recognize options that look like help. 
>> 
>> Testing: 
>> - [x] Added test case passes. 
>> 
>> Thanks, 
>> Sonia
>
> Sonia Zaldana Calles has updated the pull request incrementally with two 
> additional commits since the last revision:
> 
>  - Updating comments
>  - Enabling -help to work as well. Updating test cases

One more thing from me, as as_string() uses the ResourceArea, it probably makes 
sense to move the ResourceMark at line 412 up to line 403.

OR, avoid the allocation, we are definitely just reading the characters, so we 
could use: 
  char *rest = (char*) args.base();
(strtok_r wants a non-const char*)
  
Then OK great, done.

If you are making that update and wanted to get the .cpp file comment at line 
403 on just two lines, and in the test if you wanted to call the "-h" something 
other than "POSIX", those would not be bad final updates from my point of view.

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

PR Comment: https://git.openjdk.org/jdk/pull/19776#issuecomment-2206753142

Reply via email to