On Thu, 26 Mar 2026 11:40:00 GMT, serhiysachkov <[email protected]> wrote:
>> test/jdk/java/lang/ProcessBuilder/ReaderWriterTest.java line 182:
>>
>>> 180: System.out.println("Charset: " + cs);
>>> 181: } catch (UnsupportedCharsetException use) {
>>> 182: throw new TestAbortedException("Charset not supported: " +
>>> encoding);
>>
>> @sormuras will be able to confirm, but I believe the blessed way of doing
>> that with JUnit would be to call something like:
>>
>> Assumptions.assumeTrue(false, "Charset not supported: " + encoding);
>
> Assumptions.assumeTrue throws TestAbortedException exception if condition not
> met, wasn't comfortable with passing non conditional boolean to Assumption,
> but if this is recommended way, I can update it.
The canonical way here would be to use `Assumptions.abort(String)` API:
https://docs.junit.org/6.0.3/api/org.junit.jupiter.api/org/junit/jupiter/api/Assumptions.html#abort(java.lang.String)
`SkippedException` is a `jtreg` construct/feature. I'd leave that as-is, here.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/30446#discussion_r2994350096