RFR JDK-8156693: Improve usability of CompletableFuture use in WebSocket API

Pavel Rappo pavel.rappo at oracle.com
Wed Jun 8 13:13:56 UTC 2016


> On 7 Jun 2016, at 18:42, Roger Riggs <Roger.Riggs at oracle.com> wrote:
> 
> Hi Pavel,
> 
> Looks fine.
> 
> WebSocket.java:
> - line 82:  I'd replace 'never' with 'does not'; it is more like a statement for fact and less a guarantee.
> 
> - LIne 54: The notation "{@code .onX}" seems unnecessary, is quite cryptic, and can be removed.
> 
> Are there any tests that would be updated to go along with the change to CF<WebSocket>.
> 
> Regards, Roger

Roger, thanks for review. Here's the updated webrev:

http://cr.openjdk.java.net/~prappo/8156693/webrev.02/

Please note, I decided to address onX-notation later. For now I put it into the
TODO here:

https://bugs.openjdk.java.net/browse/JDK-8155621

Also I'm aware that current level of test coverage is very low. My plan is too
gradually increase it. What you're talking about is a useful implementation
check.
Namely, whenever a CompletableFuture returned from `sendX` methods completes
normally it MUST yield "this WebSocket" instance.

Thanks,
-Pavel



More information about the net-dev mailing list