--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/FrameConsumer.java Thu Nov 23 17:46:02 2017 +0300
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/FrameConsumer.java Thu Nov 23 18:52:22 2017 +0300
@@ -184,7 +184,7 @@
part = determinePart(isLast);
boolean text = opcode == Opcode.TEXT || originatingOpcode == Opcode.TEXT;
if (!text) {
- output.onBinary(part, data.slice());
+ output.onBinary(data.slice(), part);
data.position(data.limit()); // Consume
} else {
boolean binaryNonEmpty = data.hasRemaining();
@@ -199,7 +199,7 @@
if (!(binaryNonEmpty && !textData.hasRemaining())) {
// If there's a binary data, that result in no text, then we
// don't deliver anything
- output.onText(part, textData);
+ output.onText(textData, part);
}
}
}
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/MessageStreamConsumer.java Thu Nov 23 17:46:02 2017 +0300
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/MessageStreamConsumer.java Thu Nov 23 18:52:22 2017 +0300
@@ -34,9 +34,9 @@
*/
interface MessageStreamConsumer {
- void onText(MessagePart part, CharSequence data);
+ void onText(CharSequence data, MessagePart part);
- void onBinary(MessagePart part, ByteBuffer data);
+ void onBinary(ByteBuffer data, MessagePart part);
void onPing(ByteBuffer data);
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/WebSocketImpl.java Thu Nov 23 17:46:02 2017 +0300
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/WebSocketImpl.java Thu Nov 23 18:52:22 2017 +0300
@@ -455,7 +455,7 @@
return new MessageStreamConsumer() {
@Override
- public void onText(MessagePart part, CharSequence data) {
+ public void onText(CharSequence data, MessagePart part) {
receiver.acknowledge();
synchronized (WebSocketImpl.this.lock) {
try {
@@ -467,7 +467,7 @@
}
@Override
- public void onBinary(MessagePart part, ByteBuffer data) {
+ public void onBinary(ByteBuffer data, MessagePart part) {
receiver.acknowledge();
synchronized (WebSocketImpl.this.lock) {
try {