RFR [14] 8225583: Examine the HttpResponse.BodySubscribers for null handling

Daniel Fuchs daniel.fuchs at oracle.com
Thu Jun 13 16:57:50 UTC 2019


Hi Pavel,

Good catch, but I'd say yes. I think would object to removing it.
I'd prefer to remove:
  958             Objects.requireNonNull(throwable);

cheers,

-- daniel


On 13/06/2019 17:40, Pavel Rappo wrote:
> Given the changes in PublishingBodySubscriber.onError, do we still need this
> null check?
> 
> 884         private void signalError(Throwable err) {
> 885             if (err == null) {
> 886                 err = new NullPointerException("null throwable");
> 887             }
> 888             completionCF.completeExceptionally(err);
> 889         }
> 
>> On 13 Jun 2019, at 09:39, Chris Hegarty <chris.hegarty at oracle.com> wrote:
>>
>> The convenience BodySubscriber implementations in
>> HttpResponse.BodySubscribers should consistently
>> throw NPE when passed a null value.
>>
>> https://cr.openjdk.java.net/~chegar/8225583/webrev.00/
>>
>> -Chris.
> 



More information about the net-dev mailing list