From 6ce4d0091f1e55080f5e9e9c54f27747d1ef700f Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 29 Sep 2023 12:43:38 +0100 Subject: drop use of urp: followed by newline of space MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and just use space Change-Id: Ib2765855971691aa72643d3e3d5c06cdcbd634ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157435 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- .../com/sun/star/lib/connections/websocket/WebsocketConnection.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ridljar/com/sun/star/lib/connections/websocket/WebsocketConnection.java b/ridljar/com/sun/star/lib/connections/websocket/WebsocketConnection.java index cdffa43faf6c..87a8604c7b7d 100644 --- a/ridljar/com/sun/star/lib/connections/websocket/WebsocketConnection.java +++ b/ridljar/com/sun/star/lib/connections/websocket/WebsocketConnection.java @@ -282,7 +282,7 @@ public class WebsocketConnection extends WebSocketClient implements XConnection, boolean hasType = false; int i; for (i = 0; i < prefixedMessageBytes.length - 1; i++) { - if (prefixedMessageBytes[i] == ':' && (prefixedMessageBytes[i+1] == ' ' || prefixedMessageBytes[i+1] == '\n')) { + if (prefixedMessageBytes[i] == ':' && prefixedMessageBytes[i+1] == ' ') { hasType = true; break; // The type ends with ": ", so if we find this sequence we found the end of our type } @@ -290,7 +290,7 @@ public class WebsocketConnection extends WebSocketClient implements XConnection, } if(!hasType) { - notifyListeners_error(new com.sun.star.uno.Exception(new ProtocolException(String.format("Received URP/WS message (%s) without a type specifier. Binary messages must be proceeded by 'urp: ' or 'urp:\\n'", message)))); + notifyListeners_error(new com.sun.star.uno.Exception(new ProtocolException(String.format("Received URP/WS message (%s) without a type specifier. Binary messages must be proceeded by 'urp: '", message)))); return; } -- cgit