RFR: 8274894: Use Optional.empty() instead of ofNullable(null) in HttpResponse.BodySubscribers.discarding
Daniel Fuchs
dfuchs at openjdk.java.net
Thu Oct 7 10:42:09 UTC 2021
On Wed, 18 Aug 2021 07:55:35 GMT, Andrey Turbanov <github.com+741251+turbanoff at openjdk.org> 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.
If you integrate I will sponsor.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5159
More information about the net-dev
mailing list