diff --git a/src/main/java/com/rultor/agents/shells/RegistersShell.java b/src/main/java/com/rultor/agents/shells/RegistersShell.java index 4af497159e..8153edac2e 100644 --- a/src/main/java/com/rultor/agents/shells/RegistersShell.java +++ b/src/main/java/com/rultor/agents/shells/RegistersShell.java @@ -97,6 +97,18 @@ public Iterable process(final XML xml) throws IOException { hash, this.shell.host(), this.shell.port(), xml.xpath("/talk/@name").get(0) ); + final String host = this.shell.host(); + if (host.isEmpty()) { + throw new Profile.ConfigException( + "SSH host is empty, it's a mistake" + ); + } + final String login = this.shell.login(); + if (login.isEmpty()) { + throw new Profile.ConfigException( + "SSH login is empty, it's a mistake" + ); + } final String key = this.shell.key(); if (key.isEmpty()) { throw new Profile.ConfigException( @@ -105,9 +117,9 @@ public Iterable process(final XML xml) throws IOException { } dirs.xpath("/talk").add("shell") .attr("id", hash) - .add("host").set(this.shell.host()).up() + .add("host").set(host).up() .add("port").set(Integer.toString(this.shell.port())).up() - .add("login").set(this.shell.login()).up() + .add("login").set(login).up() .add("key").set(key); } catch (final Profile.ConfigException ex) { dirs.xpath("/talk/daemon/script").set(