jdk/src/java.httpclient/share/classes/java/net/http/WSReceiver.java
changeset 38856 cc3a0d1e96e0
parent 37874 02589df0999a
child 39133 b5641ce64cf7
--- a/jdk/src/java.httpclient/share/classes/java/net/http/WSReceiver.java	Tue Jun 07 10:33:38 2016 +0800
+++ b/jdk/src/java.httpclient/share/classes/java/net/http/WSReceiver.java	Tue Jun 07 12:29:19 2016 +0100
@@ -29,6 +29,7 @@
 import java.net.ProtocolException;
 import java.net.http.WebSocket.Listener;
 import java.nio.ByteBuffer;
+import java.nio.CharBuffer;
 import java.nio.channels.SelectionKey;
 import java.util.Optional;
 import java.util.concurrent.CompletionStage;
@@ -169,11 +170,11 @@
     private final class MessageConsumer implements WSMessageConsumer {
 
         @Override
-        public void onText(WebSocket.MessagePart part, WSDisposableText data) {
+        public void onText(WebSocket.MessagePart part, WSShared<CharBuffer> data) {
             decrementDemand();
             CompletionStage<?> cs;
             try {
-                cs = listener.onText(webSocket, data, part);
+                cs = listener.onText(webSocket, data.buffer(), part);
             } catch (Exception e) {
                 closeExceptionally(new RuntimeException("onText threw an exception", e));
                 return;