RFR: CODETOOLS-7903215: JMH: xperfasm throws incorrect error when xperf is not available [v2]
XIACYBING
duke at openjdk.org
Thu Jun 23 09:07:05 UTC 2022
On Wed, 22 Jun 2022 10:07:45 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> Ah, good find. Let's not rely on `Utils.tryWith` returning the `ArrayList`, because that would shun the messages on some failure paths. Instead, let's do this:
>
> ```
> Collection<String> errsStop = Utils.tryWith(path, "-stop");
> if (!errsStop.isEmpty()) {
> throw new ProfilerException(MSG_UNABLE_STOP + ": " + errsStop.toString());
> }
> ```
This is indeed a better way, the code has been modified.
-------------
PR: https://git.openjdk.org/jmh/pull/72
More information about the jmh-dev
mailing list