8274894: Use Optional.empty() instead of ofNullable(null) in HttpResponse.BodySubscribers.discarding
Reviewed-by: dfuchs
This commit is contained in:
parent
33050f8013
commit
d04d4ee2c1
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -1273,7 +1273,7 @@ public interface HttpResponse<T> {
|
||||
* @return a response body subscriber
|
||||
*/
|
||||
public static BodySubscriber<Void> discarding() {
|
||||
return new ResponseSubscribers.NullSubscriber<>(Optional.ofNullable(null));
|
||||
return new ResponseSubscribers.NullSubscriber<>(Optional.empty());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user