On Tue, 9 Mar 2021 05:34:23 GMT, Vipin Sharma <[email protected]> wrote:
>> JDK-8261095: Add test for clhsdb "symbol" command
>
> Vipin Sharma has updated the pull request incrementally with one additional
> commit since the last revision:
>
> Updated comments as per review and started using String.lines
test/hotspot/jtreg/serviceability/sa/ClhsdbSymbol.java line 67:
> 65: .findFirst()
> 66: .map(addresses ->
> addresses[1])
> 67: .orElse(null);
It should just call `get()` because `NoSuchElementException` would be called
when we cannot find out Thread class from stdout.
If you want to throw `RuntimeException` like next step, you should use
`orElseThrow()`.
test/hotspot/jtreg/serviceability/sa/ClhsdbSymbol.java line 86:
> 84: .map(part ->
> part.split("@ "))
> 85:
> .findFirst().map(symbolParts -> symbolParts[1])
> 86: .orElse(null);
Same comment in above.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2863