On Thu, 10 Sep 2026 10:09:36 GMT, Jorn Vernee <[email protected]> wrote:

>> This PR proposes throwing exceptions rather than swallowing them in two 
>> tests in `TestByteBuffer`.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> test/jdk/java/foreign/TestByteBuffer.java line 336:
> 
>> 334:                     assumeFalse(e.getMessage().equals("Function not 
>> implemented"),
>> 335:                             e.getMessage());
>> 336:                     throw e;
> 
> Wouldn't this test just fail on platforms that throw this exception?

Okay, I think I see what the intent is. If the message is `"Function not 
implemented"` `assumeFalse` will throw a `TestAbortedException` and terminate 
the test, otherwise we will propagate the exception (since the exception is 
unexpected in that case).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32791#discussion_r3979131073

Reply via email to