Integrated: 8288109: HttpExchangeImpl.setAttribute does not allow null value after JDK-8266897

Daniel Jeliński djelinski at openjdk.org
Mon Apr 3 15:00:15 UTC 2023


On Fri, 31 Mar 2023 10:35:27 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.

This pull request has now been integrated.

Changeset: f9827ad1
Author:    Daniel Jeliński <djelinski at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/f9827ad17205ad1cec21bf76f8553f415439b38b
Stats:     120 lines in 2 files changed: 119 ins; 0 del; 1 mod

8288109: HttpExchangeImpl.setAttribute does not allow null value after JDK-8266897

Reviewed-by: dfuchs, jpai

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

PR: https://git.openjdk.org/jdk/pull/13264


More information about the net-dev mailing list