From 4c18814b129c96c4aa7fcf9c8ebe9ae7b5e93f2d Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Wed, 8 Jun 2016 23:02:45 +0200 Subject: [PATCH] sinttest: Throw exception if service is not set --- .../java/org/igniterealtime/smack/inttest/Configuration.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/Configuration.java b/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/Configuration.java index 35f05dbbe..a30694f34 100644 --- a/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/Configuration.java +++ b/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/Configuration.java @@ -122,6 +122,11 @@ public final class Configuration { } public Builder setService(String service) throws XmppStringprepException { + if (service == null) { + // Do nothing if user did not specify the XMPP service domain. When the builder + // builds a configuration using build() it will throw a meaningful exception. + return this; + } return setService(JidCreate.domainBareFrom(service)); }