RFR: 8365086: CookieStore.getURIs() and get(URI) should return an immutable List [v2]

Jaikiran Pai jpai at openjdk.org
Fri Aug 8 14:36:18 UTC 2025


On Fri, 8 Aug 2025 14:07:31 GMT, Volkan Yazici <vyazici 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 110:
> 
>> 108:         // an element must fail
>> 109:         assertThrows(UnsupportedOperationException.class, () -> cookies.add(cookie));
>> 110:         assertThrows(UnsupportedOperationException.class, () -> cookies.remove(cookie));
> 
> Nit: You can consider factoring this out to a `assertCookieStoreIsImmutable(CookieStore)` method.

Done. I've moved couple of those assertions to a separate method to be called from each of these test methods.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26698#discussion_r2263151177


More information about the net-dev mailing list