RFR: 8321163: [test] OutputAnalyzer.getExitValue() unnecessarily logs even when process has already completed [v2]
Jaikiran Pai
jpai at openjdk.org
Fri Dec 1 11:27:20 UTC 2023
On Fri, 1 Dec 2023 11:10:16 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
>> test/lib/jdk/test/lib/process/OutputBuffer.java line 158:
>>
>>> 156: boolean aborted = true;
>>> 157: try {
>>> 158: this.processExitCode = exitCode = p.waitFor();
>>
>> According to the `waitFor` javadocs it returns the "exit value" and this function is named `getExitValue()`. I propose that we rename `processExitCode` to `exitValue` (alt. `processExitValue`).
>
> With the earlier suggestion, this would become:
>
> exitValue = p.waitFor();
You are right - exitValue instead of exitCode would be appropriate. I've updated the PR to implement this suggestion.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16919#discussion_r1411962118
More information about the core-libs-dev
mailing list