[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16622895#comment-16622895
 ] 

Gary Gregory commented on HTTPCLIENT-1942:
------------------------------------------

Hi [~rschmitt] and thank you for your contribution.

IMO, this kind of code:

{code:java}
    @Override
    public int available() {
        final ReactiveDataProducer p = responseProducer.get();
        if (p == null) {
            return 0;
        } else {
            return p.available();
        }
    }
{code}

is better like this:

{code:java}
    @Override
    public int available() {
        final ReactiveDataProducer p = responseProducer.get();
        return p == null ? 0 : p.available();
    }
{code}

Java is verbose enough as it is ;-)

Gary


> Add support for Reactive Streams
> --------------------------------
>
>                 Key: HTTPCLIENT-1942
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1942
>             Project: HttpComponents HttpClient
>          Issue Type: Wish
>          Components: HttpClient (async)
>    Affects Versions: 5.0 Beta1
>            Reporter: Ryan Schmitt
>            Priority: Major
>              Labels: stuck, volunteers-wanted
>             Fix For: Future
>
>         Attachments: client to server tput.jpeg, client to server window 
> scaling (bytes out).jpeg, server to client tput.jpeg
>
>
> It would be very helpful to me if the Apache client provided an 
> implementation of the [Reactive Streams|http://www.reactive-streams.org/] 
> spec, particularly as an implementation of the standard 
> [interfaces|https://search.maven.org/artifact/org.reactivestreams/reactive-streams/1.0.2/jar].
>  These interfaces are JDK6-compatible and have no other dependencies, but 
> they unlock interoperability with many other frameworks, such as RxJava.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to