On Mon, 24 Apr 2023 15:58:41 GMT, Aleksey Shipilev <[email protected]> wrote:
>> Volker Simonis has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Addresed review comments of @turbanoff, @shipilev and @RogerRiggs
>
> test/jdk/java/io/ObjectInputStream/NegativeArraySizeTest.java line 88:
>
>> 86: } catch (ObjectStreamException ose) {
>> 87: // OK, because a NegativeArraySizeException should be
>> converted into a ObjectStreamException
>> 88: if ("Array length is negative".equals(ose.getMessage())) {
>
> This feels like `!equals`, i.e. throw exception when the message is *not*
> "Array length is negative"?
The complete `getMessage()` is `[Ljava.lang.String;; Array length is negative`.
Perhaps:
ose.getMessage().contains("Array length is negative") ...
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13540#discussion_r1177050269