# HG changeset patch # User prappo # Date 1528282285 -3600 # Node ID 136fe961f3eb4ad8a7306ac1238579a8d6dfb802 # Parent 67fb9313d8605048ef55feb8f7625618d256bbf6 http-client-branch: review comment - WebSocket wording and realignment of javadoc diff -r 67fb9313d860 -r 136fe961f3eb src/java.net.http/share/classes/java/net/http/WebSocket.java --- a/src/java.net.http/share/classes/java/net/http/WebSocket.java Tue Jun 05 15:32:02 2018 +0100 +++ b/src/java.net.http/share/classes/java/net/http/WebSocket.java Wed Jun 06 11:51:25 2018 +0100 @@ -59,18 +59,19 @@ * receive method on the listener. The listener then must return a * {@code CompletionStage} which completes once the operation has completed. * - *

A WebSocket maintains an internal counter. - * This counter's value is a number of times the WebSocket has yet to invoke a - * receive method. While this counter is zero the WebSocket does not invoke - * receive methods. The counter is incremented by {@code n} when {@code - * request(n)} is called. The counter is decremented by one when the WebSocket - * invokes a receive method. {@code onOpen} and {@code onError} are not receive - * methods. WebSocket invokes {@code onOpen} prior to any other methods on the - * listener. WebSocket invokes {@code onOpen} at most once. WebSocket may invoke - * {@code onError} at any given time. If the WebSocket invokes {@code onError} - * or {@code onClose}, then no further listener's methods will be invoked, no - * matter the value of the counter. For a newly built WebSocket the counter is - * zero. A WebSocket invokes methods on the listener in a thread-safe manner. + *

To control message receiving, a WebSocket maintains an + * internal counter. This counter's value is a number of + * times the WebSocket has yet to invoke a receive method. While this counter is + * zero the WebSocket does not invoke receive methods. The counter is + * incremented by {@code n} when {@code request(n)} is called. The counter is + * decremented by one when the WebSocket invokes a receive method. + * {@code onOpen} and {@code onError} are not receive methods. WebSocket invokes + * {@code onOpen} prior to any other methods on the listener. WebSocket invokes + * {@code onOpen} at most once. WebSocket may invoke {@code onError} at any + * given time. If the WebSocket invokes {@code onError} or {@code onClose}, then + * no further listener's methods will be invoked, no matter the value of the + * counter. For a newly built WebSocket the counter is zero. A WebSocket invokes + * methods on the listener in a thread-safe manner. * *

Unless otherwise stated, {@code null} arguments will cause methods * of {@code WebSocket} to throw {@code NullPointerException}, similarly,