http-client-branch: (WebSocket) uninitialized variable http-client-branch
authorprappo
Tue, 13 Mar 2018 17:23:42 +0000
branchhttp-client-branch
changeset 56297 5cb14c44639b
parent 56296 829b4c16ac31
child 56298 81d4669da207
http-client-branch: (WebSocket) uninitialized variable
src/java.net.http/share/classes/jdk/internal/net/http/websocket/WebSocketImpl.java
--- a/src/java.net.http/share/classes/jdk/internal/net/http/websocket/WebSocketImpl.java	Tue Mar 13 17:12:48 2018 +0000
+++ b/src/java.net.http/share/classes/jdk/internal/net/http/websocket/WebSocketImpl.java	Tue Mar 13 17:23:42 2018 +0000
@@ -523,8 +523,10 @@
             try {
                 cs = listener.onClose(WebSocketImpl.this, statusCode, reason);
             } finally {
-                System.out.printf("[WebSocket] exit onClose %s returned %s%n",
-                                  id, cs);
+                if (DEBUG) {
+                    System.out.printf("[WebSocket] exit onClose %s returned %s%n",
+                                      id, cs);
+                }
             }
             if (cs == null) {
                 cs = DONE;
@@ -562,8 +564,10 @@
             try {
                 cs = listener.onPong(WebSocketImpl.this, binaryData);
             } finally {
-                System.out.printf("[WebSocket] exit onPong %s returned %s%n",
-                                  id, cs);
+                if (DEBUG) {
+                    System.out.printf("[WebSocket] exit onPong %s returned %s%n",
+                                      id, cs);
+                }
             }
         }
 
@@ -606,7 +610,7 @@
             long id;
             if (DEBUG) {
                 id = receiveCounter.incrementAndGet();
-                System.out.printf("[WebSocket] enter onBinary %s payload=%s, part=%s%n",
+                System.out.printf("[WebSocket] enter onBinary %s payload=%s part=%s%n",
                                   id, binaryData, part);
             }
             CompletionStage<?> cs = null;