RFR: 8365086: CookieStore.getURIs() and get(URI) should return an immutable List [v2]
Jaikiran Pai
jpai at openjdk.org
Sat Aug 9 12:07:01 UTC 2025
On Fri, 8 Aug 2025 17:18:44 GMT, Chen Liang <liach at openjdk.org> wrote:
>> Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Volkan's review - refactor assertions into a method
>
> test/jdk/java/net/CookieStoreTest.java line 107:
>
>> 105: // an element must fail
>> 106: assertThrows(UnsupportedOperationException.class, () -> list.add(elementToAddOrRemove));
>> 107: assertThrows(UnsupportedOperationException.class, () -> list.remove(elementToAddOrRemove));
>
> I think trying `list.set` would be meaningful too, given `Arrays.asList` would pass these two tests but is actually mutable.
Done. I've updated the PR to include that additional check.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26698#discussion_r2264683740
More information about the net-dev
mailing list