On Wed, 25 Oct 2023 17:23:34 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:

>> `parseListenAddress()` looks for a fairly specific format:
>> 
>> `listenRegexp = Pattern.compile("Listening for transport \\b(.+)\\b at 
>> address: \\b(.+)\\b");`
>> 
>> However, it does not assume the transport type, so maybe doing that here is 
>> not such a good idea. I don't like adding shell scripts to tests. We've been 
>> converting tests from shell scripts for years now because they tend to be 
>> problematic.
>> 
>> How about using something like launch="echo Listen Args: ". then you have a 
>> more specific string you can pattern match on:
>> 
>> `Listen Args: dt_socket 42305`
>
> Maybe you can use call `enableOnThrow()` as a trigger to use a specific echo 
> command whose pattern is later detected. I'm not so sure 
> `parseLaunchEchoListenAddress()` needs to be in JDWP since it will only be 
> used by the Debuggee class. That spares the JDWP class from needing to know 
> about this pattern.

Good to know that special shell scripts are to be avoided. I agree that your 
proposal is better than just the simple ’echo’ and fix it accordingly.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16358#discussion_r1372106905

Reply via email to