RFR: 8288109: HttpExchangeImpl.setAttribute does not allow null value after JDK-8266897 [v2]

Daniel Fuchs dfuchs at openjdk.org
Fri Mar 31 16:04:17 UTC 2023


On Fri, 31 Mar 2023 14:47:08 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:

>> Please review this fix for a regression in HttpExchange's setAttribute method.
>> 
>> The specification of setAttribute explicitly states that null values are allowed.
>> JDK-8266897 changed `attributes` to `ConcurrentHashMap`, which does not allow null values.
>> 
>> This patch modifies `setAttribute` to remove the attribute from the map when null value is requested.
>> 
>> A new test was added to verify that setting attributes works as expected both for null and non-null values.
>> 
>> Tier1-3 clean.
>
> Daniel Jeliński has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Use URIBuilder

Marked as reviewed by dfuchs (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/13264#pullrequestreview-1367212663


More information about the net-dev mailing list