Skip to content

Commit 58c5a04

Browse files
committed
Filter out unexpected messages in SockJSWriteHandlerTestServer
Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
1 parent 5b756a8 commit 58c5a04

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

vertx-web/src/test/java/io/vertx/ext/web/tests/handler/sockjs/SockJSWriteHandlerTestServer.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616

1717
package io.vertx.ext.web.tests.handler.sockjs;
1818

19-
import io.vertx.core.*;
19+
import io.vertx.core.Deployable;
20+
import io.vertx.core.Future;
21+
import io.vertx.core.VerticleBase;
22+
import io.vertx.core.Vertx;
2023
import io.vertx.core.buffer.Buffer;
2124
import io.vertx.core.eventbus.EventBus;
2225
import io.vertx.core.json.JsonArray;
@@ -106,7 +109,9 @@ private void setupSockJSHandler(Router router, Transport transport, boolean regi
106109
private static void sendToWriteHandler(EventBus eventBus, JsonObject body) {
107110
String address = body.getString("address");
108111
String content = body.getString("content");
109-
eventBus.send(address, Buffer.buffer(content));
112+
if (address != null && content != null) {
113+
eventBus.send(address, Buffer.buffer(content));
114+
}
110115
}
111116

112117
private static class EventBusRelayVerticle extends VerticleBase {

0 commit comments

Comments
 (0)