sinttest: Throw exception if service is not set

This commit is contained in:
Florian Schmaus 2016-06-08 23:02:45 +02:00
parent 60b07b1d67
commit 4c18814b12
1 changed files with 5 additions and 0 deletions

View File

@ -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));
}