On Wed, 18 Aug 2021 07:55:35 GMT, Andrey Turbanov <d...@openjdk.java.net> wrote:

> Usage of `Optional.ofNullable` is unnecessary when value is known. If it's 
> `null` value Optional.empty() should be preferred, as it doesn't perform 
> redundant `null` check.

This pull request has now been integrated.

Changeset: d04d4ee2
Author:    Andrey Turbanov <turban...@gmail.com>
Committer: Daniel Fuchs <dfu...@openjdk.org>
URL:       
https://git.openjdk.java.net/jdk/commit/d04d4ee2c193baf4339ee3025e3fbcd31d62f484
Stats:     2 lines in 1 file changed: 0 ins; 0 del; 2 mod

8274894: Use Optional.empty() instead of ofNullable(null) in 
HttpResponse.BodySubscribers.discarding

Reviewed-by: dfuchs

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

PR: https://git.openjdk.java.net/jdk/pull/5159

Reply via email to