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

>> Making too many not enough assumptions. The other method didn't make 
>> assumptions on the format of address and connection type, so I thought that 
>> I shouldn't too. I could create a temporary shell file that mimicks the 
>> other output though.
>
> `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.

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

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

Reply via email to