RFR: 8288495: [test] Make OutputAnalyzer exception more informative

Roger Riggs rriggs at openjdk.org
Thu Jun 23 13:57:39 UTC 2022


On Thu, 23 Jun 2022 06:08:49 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> test/lib/jdk/test/lib/process/OutputAnalyzer.java line 505:
>> 
>>> 503:             reportDiagnosticSummary();
>>> 504:             throw new RuntimeException("Unexpected to get exit value of ["
>>> 505:                     + notExpectedExitValue + "], exit value is: [" + getExitValue() + "]");
>> 
>> This seems redundant to me. "Unexpected to get exit value of [notExpectedExitValue]." should suffice?
>
> I agree this doesn't need changing as there is only one value to report.

Right, a bit overzealous on the expected vs actual.

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

PR: https://git.openjdk.org/jdk/pull/9247


More information about the core-libs-dev mailing list